×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Problems with XALAN under JRun 3.0

Problems with XALAN under JRun 3.0

Problems with XALAN under JRun 3.0

(OP)
I'm writting the ordering system of an e-shop. All orders are in XML. I'm using the XALAN package with my JSP to transform XML with XSL. The result is sent via email.

Everything works great as an application, or as a JSP in tomcat. But we use JRun for our shop (because tomcat does not support filtering/chaining). And there I get the following:

javax.xml.transform.TransformerConfigurationException: Namespace not supported by SAXParser
    at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:749)
    at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:601)
    at com.anecon.xmltools.TodoListUtils.getTransformationResult(TodoListUtils.java:37)
    at jrun__ExecTodoList2ejsp11._jspService(jrun__ExecTodoList2ejsp11.java:59)
    at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
    at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
    at allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34)
    at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:175)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
    at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
    at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
    at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
    at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
    at allaire.jrun.ThreadPool.run(ThreadPool.java:272)
    at allaire.jrun.WorkerThread.run(WorkerThread.java:75)
---------
org.xml.sax.SAXException: Namespace not supported by SAXParser
    at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:714)
    at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:601)
    at com.anecon.xmltools.TodoListUtils.getTransformationResult(TodoListUtils.java:37)
    at jrun__ExecTodoList2ejsp11._jspService(jrun__ExecTodoList2ejsp11.java:59)
    at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
    at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
    at allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34)
    at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:175)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
    at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
    at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
    at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
    at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
    at allaire.jrun.ThreadPool.run(ThreadPool.java:272)
    at allaire.jrun.WorkerThread.run(WorkerThread.java:75)
---------
javax.xml.parsers.ParserConfigurationException: Namespace not supported by SAXParser
    at com.sun.xml.parser.SAXParserImpl.<init>(SAXParserImpl.java:60)
    at com.sun.xml.parser.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:57)
    at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:708)
    at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:601)
    at com.anecon.xmltools.TodoListUtils.getTransformationResult(TodoListUtils.java:37)
    at jrun__ExecTodoList2ejsp11._jspService(jrun__ExecTodoList2ejsp11.java:59)
    at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
    at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
    at allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34)
    at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:175)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
    at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
    at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
    at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
    at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
    at allaire.jrun.ThreadPool.run(ThreadPool.java:272)
    at allaire.jrun.WorkerThread.run(WorkerThread.java:75)
java.lang.NullPointerException
    at javax.mail.internet.MimeUtility.checkAscii(MimeUtility.java:877)
    at javax.mail.internet.MimeBodyPart.setText(MimeBodyPart.java:748)
    at javax.mail.internet.MimeMessage.setText(MimeMessage.java:1146)
    at javax.mail.internet.MimeMessage.setText(MimeMessage.java:1134)
    at com.anecon.xmltools.TodoListUtils.sendMsg(TodoListUtils.java:66)
    at jrun__ExecTodoList2ejsp11._jspService(jrun__ExecTodoList2ejsp11.java:64)
    at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
    at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
    at allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34)
    at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:175)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
    at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
    at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)
    at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
    at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
    at allaire.jrun.http.WebEndpoint.run(WebEndpoint.java:107)
    at allaire.jrun.ThreadPool.run(ThreadPool.java:272)
    at allaire.jrun.WorkerThread.run(WorkerThread.java:75)


Any help why this is would be great.
thx thebigf

RE: Problems with XALAN under JRun 3.0

The problem is that JRun has an xml-processor and xsl-processor(XT) of it's own that is not compatible with Xalan. I tried to remove the jars from jrun that cointains the xml-related stuff, but then JRun refused to start Anyone with better luck?

Mikael Ernholm (mikael.ernholm@sdd.se)

RE: Problems with XALAN under JRun 3.0

Now I've got it up working. Just remove xt.jar in jrun/lib and parser.jar and jaxp.jar int jrun/lib/ext and place xerces.jar(comes with xalan) in jrun/lib/ext, and voila!

Mikael Ernholm(mikael.ernholm@sdd.se)

RE: Problems with XALAN under JRun 3.0

You beauty!

Been trying to figure that one out for a while!

Tiz

RE: Problems with XALAN under JRun 3.0

So Tiz,

Did you get that to work? I just tried it and am still getting the "Namespace not supported by SAXParser" error.

included below is the jsp I'm trying to use as a test

Thanks,
-Scott

<%@ page import="javax.xml.transform.*;"%>
<%@ page import="javax.xml.transform.sax.*;"%>
<%@ page import="javax.xml.transform.stream.*;"%>
<%@ page import="org.xml.sax.*;"%>

<html>
<head>
    <title>Untitled</title>
</head>

<body>
<% // 1. Instantiate the TransformerFactory.
javax.xml.transform.TransformerFactory tFactory =
                    javax.xml.transform.TransformerFactory.newInstance();
// 2a. Get the stylesheet from the XML source.
String media = null , title = null, charset = null;
javax.xml.transform.Source stylesheet = tFactory.getAssociatedStylesheet
                   (new StreamSource("foo.xml"),media, title, charset);

// 2b. Process the stylesheet and generate a Transformer.
Transformer transformer = tFactory.newTransformer(stylesheet);

// 3. Use the Transformer to perform the transformation and send the
//    the output to a Result object.
transformer.transform
             (new javax.xml.transform.stream.StreamSource("foo.xml"),
              new StreamResult (new java.io.FileOutputStream("foo.out")));
 %>

<%= "<br>.........................................................." %>
</body>
</html>

RE: Problems with XALAN under JRun 3.0

Hi, i have been looking for the source code to transform my xsl and xml files into html using Xalan.

Thanx alot!!!!!

RE: Problems with XALAN under JRun 3.0

Thanks,

I haven't tried to mess with it since then, I was under the gun on a deadline (built a bugtracker w/ servlets/XSL), and ended up pushing it out with apache/jserv instead of Jrun. I'll go revisit it when I get some free time, I'd rather switch to IIS, since a lot of the intranet apps we have are in ASP and I'd like to run the stuff on the same server.

-Scott

RE: Problems with XALAN under JRun 3.0

I've run into this problem, too, but when I remove the parser.jar and jaxp.jar from the jrun/lib/ext, the servers (admin and default) won't start up.  

It appears that JRun and Xalan aren't getting along.

Karen Fox
Technical Assistant
kfox@mitre.org

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close