tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Soefara Redzuan" <>
Subject Re: Running XML-parsing servlets on Tomcat, using JAXP ?
Date Fri, 27 Sep 2002 01:45:41 GMT

Sorry for the very very late follow up to my problem.

Eventually solved it. I later found out it was a clash
with the XML-RPC libraries which I forgot were also in
WEB-INF/lib. I think it's a bug in the Apache XML-RPC
libs as somebody else experienced the same problem.

So, I've got JAXP working on Tomcat. Hoorah !

And yes, I put the JAXP classes in $TOMCAT_HOME/common/lib
(And also removed some of the previous libraries that were there).


>From: Jacob Kjome <>
>Reply-To: "Tomcat Users List" <>
>To: "Tomcat Users List" <>
>Subject: Re: Running XML-parsing servlets on Tomcat, using JAXP ?
>Date: Sun, 15 Sep 2002 22:29:17 -0500
>At 10:58 AM 9/16/2002 +0800, you wrote:
>>Let me know how it went. I'm curious that the java xml pack had 
>>instructions for that. Well I suppose they have tested it, so I guess it 
>>is harmless.
>>Anyway like you said, you can always bundle the java xml pack under its 
>>own webapp.
>Bad assumption!  Tomcat will either ignore or throw exceptions if you put 
>your XML and/or DOM classes under WEB-INF/lib.  This is because it violates 
>the Sun classloading spec which Tomcat started enforcing as of 
>Tomcat-4.0.2.  In order to use XML/DOM libraries, they need to be in a 
>parent classloader such as $TOMCAT_HOME/lib (shared/lib on Tomcat-4.1.x) or 
>common/lib.  Don't ask me to explain the reasons why this is against the 
>classloading spec.  It just is.  Maybe Remmy can explain better?
>>Soefara Redzuan wrote:
>>>>From: Kwok Peng Tuck <>
>>>>Hmm, how did you get a jasper directory under the tomcat root ?
>>>That's where it is in Tomcat4.0.x under Windows 2000, at
>>>least the version that I downloaded and installed.
>>>>I checked my tomcat installation in Win2K & I didn't see anything like

>>>Perhaps you have a different version to me. It seems that
>>>the libraries shipped with Tomcat4 are changing a lot.
>>>>Your /common/lib seems to have a lot more than the standard libraries 
>>>>shipped with it, I 've got :
>>>>            a) activation.jar
>>>>            b) jdbc2_0-stdex.jar
>>>>            c) jndi.jar
>>>>            d) jta-spec1_0_1.jar
>>>>            e) mail.jar
>>>>            f) naming-common.jar
>>>>            g) naming-resource.jar
>>>>            h) servlet.jar
>>>>            i) tools.jar
>>>>            j) tyrex.license
>>>>            k) tyrex-
>>>>            l) xerces.jar
>>>Well, in my version I had crimson.jar and not xerces.jar.
>>>>How did dom.jar , xalan.jar, mysql.jar end up there ?
>>>dom.jar and xalan.jar are part of the Java XML pack, along with 
>>>xercesImpl.jar, sax.jar, jaxp-api.jar and xsltc.jar. The Java XML
>>>Pack says to put them in <tomcat_home>/common/lib
>>>In your case, I think they would require you to remove xerces.jar
>>>>Generally if you wish to use any other jar(s) you put them in {webapps 
>>>>root} /WEB-INF/lib .
>>>That's true, but for libraries that you're going to use amongst
>>>all webapps (eg. mysql.jar in my case), then you can also put them
>>>in <tomcat_home>/common/lib
>>>However, I do think I'll try what you said - put the libraries in
>>>/webapps/<webapp name>/WEB-INF/lib and see if that helps. Will
>>>let you know.
>>>Thank you,
>>>>>>>I'd still like to keep jaxp installed on my machine for other
>>>>>>>java applications. This won't affect Tomcat at all, will it ?
>>>>>>NO, It should not, I recommend you do not place the jar file in your

>>>>>>classpath. We never know...
>>>>>I tried removing the jars from the classpath but it made no
>>>>>difference, as we all pretty much expected in any case.
>>>>>I'm using Tomcat4.0.x and JDK1.3
>>>>>I found that <tomcat_home>/common/lib/crimson.jar also included
>>>>>a org.xml.sax library, so I removed crimson.jar.  Still, the
>>>>>errors persisted.
>>>>>Here is what I have on my system,
>>>>><tomcat_home>/common/lib contains
>>>>>(none of those seem to have any clashing xml libraries)
>>>>><tomcat_home>/lib contains
>>>>>But now I think I've found the culprit - Jasper !
>>>>><tomcat_home>/jasper contains
>>>>>who or what is Jasper ? I don't wish to remove something that is
>>>>>core to Tomcat functionality, but I think that crimson.jar and
>>>>>jaxp.jar may be clashing with xercesImpl.jar and jaxp-api.jar
>>>>>in <tomcat_home>/common/lib.
>>>>>Does anybody know how I should handle this ?
>>>>>I really would just upgrade to the latest version of
>>>>>Tomcat and JDK1.4 but my production servers are running
>>>>>JDK1.3 and Tomcat 4.0 so I can't take that risk at the moment.
>>>>>So many changes, so little time.
>>>>>Thank you in advance,
>>>MSN Photos is the easiest way to share and print your photos: 
>>>To unsubscribe, e-mail:
>>>For additional commands, e-mail: 
>>To unsubscribe, e-mail:   
>>For additional commands, e-mail: 

Chat with friends online, try MSN Messenger:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message