You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by My...@lotus.com on 2001/02/01 20:06:18 UTC
RE: Xalan and Apache / Namespace not supported bySAXParser
Chris,
I'm guessing that setting setNamespaceAware(true) did not help? I wonder if
there is then a configuration issue ? Can you verify that you are pointing
to the correct version of the parser? Maybe Apache is doing something to
the classpath??
Myriam
"chris markiewicz" <cm...@commnav.com> on 02/01/2001 01:55:24 PM
Please respond to xalan-dev@xml.apache.org
To: <xa...@xml.apache.org>
cc: <va...@jpl.nasa.gov> (bcc: Myriam Midy/CAM/Lotus)
Subject: RE: Xalan and Apache
vanessa
i am having the same problem...exactly the same problem actually. apache
bad, command line good - although i have not tried a different server. i
recently posted essentially the same message under the title "namespace not
suppored by SAXParser???" if you learn anything, please let me know. i'll
do the same.
thanks
chris
-----Original Message-----
From: Vanessa D Johnson [mailto:vanessa.d.johnson@jpl.nasa.gov]
Sent: Thursday, February 01, 2001 11:59 AM
To: xalan-dev@xml.apache.org
Subject: Xalan and Apache
I am using xalan package for Java to do an XSL transformation
from within a servlet running Apache web server. I am running
into a namespace problem "Namespace not supported by SAXParser "
when I call newTransformer(StreamSource) on the
TransformerFactory object. The same code works outside of Apache
when I run it from a main() Java class. I have tried another web
server (WebLogic) and there is no problem.
Is anyone familiar with this issue?
Vanessa D. Johnson
Mission Execution and Automation Section
Jet Propulsion Laboratory
(818) 354-3885
Re: Xalan and Apache / Namespace not supported bySAXParser
Posted by Bob Mulrenin <bo...@salzburgresearch.at>.
On Fri, 2 Feb 2001 17:26:28 -0500
"chris markiewicz" <cm...@commnav.com> wrote:
> hello.
>
> i am convinced that jrun's jaxp.jar and xt.jar are causing my problem.
>
> has anyone figured out a workaround to this problem? jaxp.jar uses some
> "old" classes but i cannot simply remove it from the classpath because jrun
> uses it. (surely someone is using jrun.)
>
> and while ditching jrun and using tomcat is indeed a workaround, it is not
Under Tomcat 3.2, I had to place xalan and xerces ahead of **both** jaxp
and parser jars in the startup script classpath.. Did you have to do
this as well in Tomcat?
> an acceptable one...unfortunately.
>
> thank you very much.
> chris
>
>
> -----Original Message-----
> From: Gary L Peskin [mailto:garyp@firstech.com]
> Sent: Thursday, February 01, 2001 5:10 PM
> To: xalan-dev@xml.apache.org
> Subject: Re: Xalan and Apache / Namespace not supported bySAXParser
>
>
> chris markiewicz wrote:
> >
> > jrun has it's own classpath entry...one quirk is that if you put a
> directory
> > in the classpath, it loads all jars that are in that directory (as well as
> > classes). i make sure that only the necessary jars are found in that
> > classpath.
> >
> > the results of your suggestions are found below...i added linefeeds to the
> > classpath to make it readable...xalan and xerces are found at the bottom.
> > only one copy of each. also i am ashamed to admit that the identity of
> the
> > classloader does not mean anything to me. did you just want to see if
> jrun
> > was using its own?
>
> Yes. It looks like it's using the standard Sun-supplied classloader.
>
> >
> > GMT Time:2/1/01 4:12 PM XSLXalanEngine ContextClassLoader is
> > sun.misc.Launcher$AppClassLoader
> > GMT Time:2/1/01 4:12 PM XSLXalanEngine
> > java.class.path =
> > /usr/local/JRun/bin/../lib/ext:
> > /usr/local/JRun/bin/../lib/ext/activation.jar:
> > /usr/local/JRun/bin/../lib/ext/ejb.jar:
> > /usr/local/JRun/bin/../lib/ext/jaxp.jar:
> > /usr/local/JRun/bin/../lib/ext/jdbc.jar:
> > /usr/local/JRun/bin/../lib/ext/jms.jar:
> > /usr/local/JRun/bin/../lib/ext/jndi.jar:
> > /usr/local/JRun/bin/../lib/ext/jta.jar:
> > /usr/local/JRun/bin/../lib/ext/mail.jar:
> > /usr/local/JRun/bin/../lib/ext/parser.jar:
> > /usr/local/JRun/bin/../lib/ext/pop3.jar:
> > /usr/local/JRun/bin/../lib/ext/servlet.jar:
> > /usr/local/JRun/bin/../lib/jrun.jar:
> > /usr/local/JRun/bin/../lib/install.jar:
> > /usr/local/JRun/bin/../lib/ejipt.jar:
> > /usr/local/JRun/bin/../lib/ejipt_client.jar:
> > /usr/local/JRun/bin/../lib/ejipt_tools.jar:
> > /usr/local/java/lib/tools.jar:
> > /usr/local/JRun/bin/../lib/jsp.jar:
> > /usr/local/JRun/bin/../lib/ssi.jar:
> > /usr/local/JRun/bin/../lib/wddx.jar:
> > /usr/local/JRun/bin/../lib/xt.jar:
> > /usr/local/JRun/bin/../lib/rhino.jar:
> > /usr/local/JRun/bin/../servers/lib:
> > /usr/local/JRun/bin/../servers/lib/jruntags.jar:
> > /home/cmarkiew/jrun/lib:
> > /home/cmarkiew/mars/classes:
> > /home/cmarkiew/includes:
> > /home/cmarkiew/includes/bsf.jar:
> > /home/cmarkiew/includes/jdbc7.0-1.2.jar:
> > /home/cmarkiew/includes/jdom.jar:
> > /home/cmarkiew/includes/js.jar:
> > /home/cmarkiew/includes/mysql.jar:
> > /home/cmarkiew/includes/saxon.jar:
> > /home/cmarkiew/includes/xalan.jar:
> > /home/cmarkiew/includes/xerces.jar
> > GMT Time:2/1/01 4:12 PM XSLXalanEngine java.ext.dirs =
> > /usr/local/jdk1.3/jre/lib/ext
>
> The suspect jars are: jaxp.jar (as Myriam pointed out) and xt.jar. I
> obviously don't know what's in each of the jars. But, you might look at
> them with WinZip (if you're on Windows) or the .jar tool. Then, look
> for an XMLReader class or any classes in package org.xml.sax. Any jar
> containing these classes is suspect. Try to rename the .jar file to
> .oldjar or something like that and restart JRun and see if the problem
> is resolved.
>
> HTH,
> Gary
>
Bob
Robert Mulrenin
SalzburgNewMediaLab
Salzburg Research Forschungsgesellschaft m.b.H
Jakob-Haringer-Strasse 5/III
A-5020 Salzburg
AUSTRIA
phone: +43-662-2288-402
fax: +43-662-2288-222
Re: Xalan and Apache / Namespace not supported bySAXParser
Posted by Gary L Peskin <ga...@firstech.com>.
chris markiewicz wrote:
>
> hello.
>
> i am convinced that jrun's jaxp.jar and xt.jar are causing my problem.
>
> has anyone figured out a workaround to this problem? jaxp.jar uses some
> "old" classes but i cannot simply remove it from the classpath because jrun
> uses it. (surely someone is using jrun.)
>
> and while ditching jrun and using tomcat is indeed a workaround, it is not
> an acceptable one...unfortunately.
>
> thank you very much.
> chris
>
Chris --
You should be able to move them behind xalan.jar and xerces.jar so that
they appear later in the classpath. That way, the classes in xalan and
xerces will take priority.
Gary
RE: Xalan and Apache / Namespace not supported bySAXParser
Posted by chris markiewicz <cm...@commnav.com>.
hello.
i am convinced that jrun's jaxp.jar and xt.jar are causing my problem.
has anyone figured out a workaround to this problem? jaxp.jar uses some
"old" classes but i cannot simply remove it from the classpath because jrun
uses it. (surely someone is using jrun.)
and while ditching jrun and using tomcat is indeed a workaround, it is not
an acceptable one...unfortunately.
thank you very much.
chris
-----Original Message-----
From: Gary L Peskin [mailto:garyp@firstech.com]
Sent: Thursday, February 01, 2001 5:10 PM
To: xalan-dev@xml.apache.org
Subject: Re: Xalan and Apache / Namespace not supported bySAXParser
chris markiewicz wrote:
>
> jrun has it's own classpath entry...one quirk is that if you put a
directory
> in the classpath, it loads all jars that are in that directory (as well as
> classes). i make sure that only the necessary jars are found in that
> classpath.
>
> the results of your suggestions are found below...i added linefeeds to the
> classpath to make it readable...xalan and xerces are found at the bottom.
> only one copy of each. also i am ashamed to admit that the identity of
the
> classloader does not mean anything to me. did you just want to see if
jrun
> was using its own?
Yes. It looks like it's using the standard Sun-supplied classloader.
>
> GMT Time:2/1/01 4:12 PM XSLXalanEngine ContextClassLoader is
> sun.misc.Launcher$AppClassLoader
> GMT Time:2/1/01 4:12 PM XSLXalanEngine
> java.class.path =
> /usr/local/JRun/bin/../lib/ext:
> /usr/local/JRun/bin/../lib/ext/activation.jar:
> /usr/local/JRun/bin/../lib/ext/ejb.jar:
> /usr/local/JRun/bin/../lib/ext/jaxp.jar:
> /usr/local/JRun/bin/../lib/ext/jdbc.jar:
> /usr/local/JRun/bin/../lib/ext/jms.jar:
> /usr/local/JRun/bin/../lib/ext/jndi.jar:
> /usr/local/JRun/bin/../lib/ext/jta.jar:
> /usr/local/JRun/bin/../lib/ext/mail.jar:
> /usr/local/JRun/bin/../lib/ext/parser.jar:
> /usr/local/JRun/bin/../lib/ext/pop3.jar:
> /usr/local/JRun/bin/../lib/ext/servlet.jar:
> /usr/local/JRun/bin/../lib/jrun.jar:
> /usr/local/JRun/bin/../lib/install.jar:
> /usr/local/JRun/bin/../lib/ejipt.jar:
> /usr/local/JRun/bin/../lib/ejipt_client.jar:
> /usr/local/JRun/bin/../lib/ejipt_tools.jar:
> /usr/local/java/lib/tools.jar:
> /usr/local/JRun/bin/../lib/jsp.jar:
> /usr/local/JRun/bin/../lib/ssi.jar:
> /usr/local/JRun/bin/../lib/wddx.jar:
> /usr/local/JRun/bin/../lib/xt.jar:
> /usr/local/JRun/bin/../lib/rhino.jar:
> /usr/local/JRun/bin/../servers/lib:
> /usr/local/JRun/bin/../servers/lib/jruntags.jar:
> /home/cmarkiew/jrun/lib:
> /home/cmarkiew/mars/classes:
> /home/cmarkiew/includes:
> /home/cmarkiew/includes/bsf.jar:
> /home/cmarkiew/includes/jdbc7.0-1.2.jar:
> /home/cmarkiew/includes/jdom.jar:
> /home/cmarkiew/includes/js.jar:
> /home/cmarkiew/includes/mysql.jar:
> /home/cmarkiew/includes/saxon.jar:
> /home/cmarkiew/includes/xalan.jar:
> /home/cmarkiew/includes/xerces.jar
> GMT Time:2/1/01 4:12 PM XSLXalanEngine java.ext.dirs =
> /usr/local/jdk1.3/jre/lib/ext
The suspect jars are: jaxp.jar (as Myriam pointed out) and xt.jar. I
obviously don't know what's in each of the jars. But, you might look at
them with WinZip (if you're on Windows) or the .jar tool. Then, look
for an XMLReader class or any classes in package org.xml.sax. Any jar
containing these classes is suspect. Try to rename the .jar file to
.oldjar or something like that and restart JRun and see if the problem
is resolved.
HTH,
Gary
Re: Xalan and Apache / Namespace not supported bySAXParser
Posted by Gary L Peskin <ga...@firstech.com>.
chris markiewicz wrote:
>
> jrun has it's own classpath entry...one quirk is that if you put a directory
> in the classpath, it loads all jars that are in that directory (as well as
> classes). i make sure that only the necessary jars are found in that
> classpath.
>
> the results of your suggestions are found below...i added linefeeds to the
> classpath to make it readable...xalan and xerces are found at the bottom.
> only one copy of each. also i am ashamed to admit that the identity of the
> classloader does not mean anything to me. did you just want to see if jrun
> was using its own?
Yes. It looks like it's using the standard Sun-supplied classloader.
>
> GMT Time:2/1/01 4:12 PM XSLXalanEngine ContextClassLoader is
> sun.misc.Launcher$AppClassLoader
> GMT Time:2/1/01 4:12 PM XSLXalanEngine
> java.class.path =
> /usr/local/JRun/bin/../lib/ext:
> /usr/local/JRun/bin/../lib/ext/activation.jar:
> /usr/local/JRun/bin/../lib/ext/ejb.jar:
> /usr/local/JRun/bin/../lib/ext/jaxp.jar:
> /usr/local/JRun/bin/../lib/ext/jdbc.jar:
> /usr/local/JRun/bin/../lib/ext/jms.jar:
> /usr/local/JRun/bin/../lib/ext/jndi.jar:
> /usr/local/JRun/bin/../lib/ext/jta.jar:
> /usr/local/JRun/bin/../lib/ext/mail.jar:
> /usr/local/JRun/bin/../lib/ext/parser.jar:
> /usr/local/JRun/bin/../lib/ext/pop3.jar:
> /usr/local/JRun/bin/../lib/ext/servlet.jar:
> /usr/local/JRun/bin/../lib/jrun.jar:
> /usr/local/JRun/bin/../lib/install.jar:
> /usr/local/JRun/bin/../lib/ejipt.jar:
> /usr/local/JRun/bin/../lib/ejipt_client.jar:
> /usr/local/JRun/bin/../lib/ejipt_tools.jar:
> /usr/local/java/lib/tools.jar:
> /usr/local/JRun/bin/../lib/jsp.jar:
> /usr/local/JRun/bin/../lib/ssi.jar:
> /usr/local/JRun/bin/../lib/wddx.jar:
> /usr/local/JRun/bin/../lib/xt.jar:
> /usr/local/JRun/bin/../lib/rhino.jar:
> /usr/local/JRun/bin/../servers/lib:
> /usr/local/JRun/bin/../servers/lib/jruntags.jar:
> /home/cmarkiew/jrun/lib:
> /home/cmarkiew/mars/classes:
> /home/cmarkiew/includes:
> /home/cmarkiew/includes/bsf.jar:
> /home/cmarkiew/includes/jdbc7.0-1.2.jar:
> /home/cmarkiew/includes/jdom.jar:
> /home/cmarkiew/includes/js.jar:
> /home/cmarkiew/includes/mysql.jar:
> /home/cmarkiew/includes/saxon.jar:
> /home/cmarkiew/includes/xalan.jar:
> /home/cmarkiew/includes/xerces.jar
> GMT Time:2/1/01 4:12 PM XSLXalanEngine java.ext.dirs =
> /usr/local/jdk1.3/jre/lib/ext
The suspect jars are: jaxp.jar (as Myriam pointed out) and xt.jar. I
obviously don't know what's in each of the jars. But, you might look at
them with WinZip (if you're on Windows) or the .jar tool. Then, look
for an XMLReader class or any classes in package org.xml.sax. Any jar
containing these classes is suspect. Try to rename the .jar file to
.oldjar or something like that and restart JRun and see if the problem
is resolved.
HTH,
Gary
RE: Xalan and Apache / Namespace not supported bySAXParser
Posted by chris markiewicz <cm...@commnav.com>.
jrun has it's own classpath entry...one quirk is that if you put a directory
in the classpath, it loads all jars that are in that directory (as well as
classes). i make sure that only the necessary jars are found in that
classpath.
the results of your suggestions are found below...i added linefeeds to the
classpath to make it readable...xalan and xerces are found at the bottom.
only one copy of each. also i am ashamed to admit that the identity of the
classloader does not mean anything to me. did you just want to see if jrun
was using its own?
GMT Time:2/1/01 4:12 PM XSLXalanEngine ContextClassLoader is
sun.misc.Launcher$AppClassLoader
GMT Time:2/1/01 4:12 PM XSLXalanEngine
java.class.path =
/usr/local/JRun/bin/../lib/ext:
/usr/local/JRun/bin/../lib/ext/activation.jar:
/usr/local/JRun/bin/../lib/ext/ejb.jar:
/usr/local/JRun/bin/../lib/ext/jaxp.jar:
/usr/local/JRun/bin/../lib/ext/jdbc.jar:
/usr/local/JRun/bin/../lib/ext/jms.jar:
/usr/local/JRun/bin/../lib/ext/jndi.jar:
/usr/local/JRun/bin/../lib/ext/jta.jar:
/usr/local/JRun/bin/../lib/ext/mail.jar:
/usr/local/JRun/bin/../lib/ext/parser.jar:
/usr/local/JRun/bin/../lib/ext/pop3.jar:
/usr/local/JRun/bin/../lib/ext/servlet.jar:
/usr/local/JRun/bin/../lib/jrun.jar:
/usr/local/JRun/bin/../lib/install.jar:
/usr/local/JRun/bin/../lib/ejipt.jar:
/usr/local/JRun/bin/../lib/ejipt_client.jar:
/usr/local/JRun/bin/../lib/ejipt_tools.jar:
/usr/local/java/lib/tools.jar:
/usr/local/JRun/bin/../lib/jsp.jar:
/usr/local/JRun/bin/../lib/ssi.jar:
/usr/local/JRun/bin/../lib/wddx.jar:
/usr/local/JRun/bin/../lib/xt.jar:
/usr/local/JRun/bin/../lib/rhino.jar:
/usr/local/JRun/bin/../servers/lib:
/usr/local/JRun/bin/../servers/lib/jruntags.jar:
/home/cmarkiew/jrun/lib:
/home/cmarkiew/mars/classes:
/home/cmarkiew/includes:
/home/cmarkiew/includes/bsf.jar:
/home/cmarkiew/includes/jdbc7.0-1.2.jar:
/home/cmarkiew/includes/jdom.jar:
/home/cmarkiew/includes/js.jar:
/home/cmarkiew/includes/mysql.jar:
/home/cmarkiew/includes/saxon.jar:
/home/cmarkiew/includes/xalan.jar:
/home/cmarkiew/includes/xerces.jar
GMT Time:2/1/01 4:12 PM XSLXalanEngine java.ext.dirs =
/usr/local/jdk1.3/jre/lib/ext
-----Original Message-----
From: Gary L Peskin [mailto:garyp@firstech.com]
Sent: Thursday, February 01, 2001 3:13 PM
To: xalan-dev@xml.apache.org
Subject: Re: Xalan and Apache / Namespace not supported bySAXParser
chris markiewicz wrote:
>
> myriam
>
> oh, right. i forgot to mention that i called setNamespaceAware(true) and
it
> did not help.
>
> i am confident that i am pointing to the correct version of the
> parser...it's actually JRun that holds my classpath and not apache. i
have
> double-checked that both my command line implementation of SimpleTransform
> and my jrun application are both pointing at the same copies of xerces and
> xalan.
>
> please let me know if you have any other ideas. i am going to try the
same
> code with Saxon to see if i get a similar problem.
PMFJI and I haven't been following this whole thread but it seems to me
like we are finding the wrong XML parser. I am not at all familiar with
JRun but since you are using it, it must be the one responsible for
loading the classes. I think that most of the servlet containers use
their own classloading mechanism so the CLASSPATH may or may not be
used.
I think the first thing to determine is what ClassLoader is in use. If
you are running under Java2, I'd insert the following line in your code
before the line that blows up:
System.err.println("ContextClassLoader is " +
Thread.currentThread().getContextClassLoader().getClass().getName());
This will tell you the classloader that is the context class loader.
You might also want to look at the classpath by inserting the following
statement:
System.err.println("java.class.path = " +
System.getProperty("java.class.path"));
System.err.println("java.ext.dirs = " +
System.getProperty("java.ext.dirs"));
HTH,
Gary
Re: Xalan and Apache / Namespace not supported bySAXParser
Posted by Gary L Peskin <ga...@firstech.com>.
chris markiewicz wrote:
>
> myriam
>
> oh, right. i forgot to mention that i called setNamespaceAware(true) and it
> did not help.
>
> i am confident that i am pointing to the correct version of the
> parser...it's actually JRun that holds my classpath and not apache. i have
> double-checked that both my command line implementation of SimpleTransform
> and my jrun application are both pointing at the same copies of xerces and
> xalan.
>
> please let me know if you have any other ideas. i am going to try the same
> code with Saxon to see if i get a similar problem.
PMFJI and I haven't been following this whole thread but it seems to me
like we are finding the wrong XML parser. I am not at all familiar with
JRun but since you are using it, it must be the one responsible for
loading the classes. I think that most of the servlet containers use
their own classloading mechanism so the CLASSPATH may or may not be
used.
I think the first thing to determine is what ClassLoader is in use. If
you are running under Java2, I'd insert the following line in your code
before the line that blows up:
System.err.println("ContextClassLoader is " +
Thread.currentThread().getContextClassLoader().getClass().getName());
This will tell you the classloader that is the context class loader.
You might also want to look at the classpath by inserting the following
statement:
System.err.println("java.class.path = " +
System.getProperty("java.class.path"));
System.err.println("java.ext.dirs = " +
System.getProperty("java.ext.dirs"));
HTH,
Gary
RE: Xalan and Apache / Namespace not supported bySAXParser
Posted by chris markiewicz <cm...@commnav.com>.
myriam
oh, right. i forgot to mention that i called setNamespaceAware(true) and it
did not help.
i am confident that i am pointing to the correct version of the
parser...it's actually JRun that holds my classpath and not apache. i have
double-checked that both my command line implementation of SimpleTransform
and my jrun application are both pointing at the same copies of xerces and
xalan.
please let me know if you have any other ideas. i am going to try the same
code with Saxon to see if i get a similar problem.
thanks
chris
-----Original Message-----
From: Myriam_Midy@lotus.com [mailto:Myriam_Midy@lotus.com]
Sent: Thursday, February 01, 2001 2:06 PM
To: xalan-dev@xml.apache.org
Subject: RE: Xalan and Apache / Namespace not supported bySAXParser
Chris,
I'm guessing that setting setNamespaceAware(true) did not help? I wonder if
there is then a configuration issue ? Can you verify that you are pointing
to the correct version of the parser? Maybe Apache is doing something to
the classpath??
Myriam
"chris markiewicz" <cm...@commnav.com> on 02/01/2001 01:55:24 PM
Please respond to xalan-dev@xml.apache.org
To: <xa...@xml.apache.org>
cc: <va...@jpl.nasa.gov> (bcc: Myriam Midy/CAM/Lotus)
Subject: RE: Xalan and Apache
vanessa
i am having the same problem...exactly the same problem actually. apache
bad, command line good - although i have not tried a different server. i
recently posted essentially the same message under the title "namespace not
suppored by SAXParser???" if you learn anything, please let me know. i'll
do the same.
thanks
chris
-----Original Message-----
From: Vanessa D Johnson [mailto:vanessa.d.johnson@jpl.nasa.gov]
Sent: Thursday, February 01, 2001 11:59 AM
To: xalan-dev@xml.apache.org
Subject: Xalan and Apache
I am using xalan package for Java to do an XSL transformation
from within a servlet running Apache web server. I am running
into a namespace problem "Namespace not supported by SAXParser "
when I call newTransformer(StreamSource) on the
TransformerFactory object. The same code works outside of Apache
when I run it from a main() Java class. I have tried another web
server (WebLogic) and there is no problem.
Is anyone familiar with this issue?
Vanessa D. Johnson
Mission Execution and Automation Section
Jet Propulsion Laboratory
(818) 354-3885