tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Soefara Redzuan" <soefararedz...@hotmail.com>
Subject Re: Running XML-parsing servlets on Tomcat, using JAXP ?
Date Thu, 12 Sep 2002 23:08:31 GMT

Thank you very much for replying, Jean-Francois,

>From: Jean-Francois Arcand <jfarcand@apache.org>
>
>You don't need the jax-pack for your problem. Under 
>{CATALINA_HOME}/common/endorsed, just copy the xerces.jar and the 
>jaxp-ri.jar file. Tomcat will uses this folder for selecting which parser 
>to use (so crimson will not be used).

I don't have a "common/endorsed" folder. Is this specific to more
recent versions of Tomcat ? I'll create it anyway.

Also, I've got a jaxp.jar and jaxp-api.jar file but what is
jaxp-ri.jar ?

I'd still like to keep jaxp installed on my machine for other
java applications. This won't affect Tomcat at all, will it ?

Thank you again.

Soefara.



>Soefara Redzuan wrote:
>
>>Has anybody managed to run XML-parsing servlets on Tomcat 4 using JAXP?
>>If so, could you please help me with the XML configuration for
>>Tomcat because I keep getting class clashes. Here's what I've done
>>so far,
>>
>>1. Downloaded the Java XML Pack from
>>http://java.sun.com/xml/javaxmlpack.html
>>
>>2. Unpacked the Java XML Pack and put the JAXP jar files (dom.jar,
>>jaxp-api.jar, sax.jar, xalan.jar, xercesImpl.jar and xsltc.jar)
>>in the directory c:\jdk1.3\jaxp-1.2_01
>>
>>3. Added all the jars to the CLASSPATH
>>
>>4. The Java XML Pack instructions then read,
>>
>> > When you run the examples on Tomcat you must copy all
>> > the JAR files from the Java XML Pack to CATALINA_HOME/common/lib .
>> > Some of these files already exist in Tomcat distribution and
>> > should be overwritten by the Java XML Pack JARs. The xerces.jar
>> > that comes with the tomcat installation should also be removed
>> > from CATALINA_HOME/common/lib.
>>
>>I copied all of the JAXP jar files (dom.jar, jaxp-api.jar,
>>sax.jar, xalan.jar, xercesImpl.jar and xsltc.jar) to
>>CATALINA_HOME/common/lib but strangely none of them existed
>>there previously ! Also, there was no "xerces.jar" that
>>supposedly came with the Tomcat distribution according to the
>>Sun documentation.
>>There is however, a crimson.jar (I'm using an early Tomcat4.x)
>>and a jaxp.jar which I removed, since JAXP's jaxp-api.jar
>>seems to contain updated libraries.
>>
>>5. I restarted Tomcat and then tried to run a servlet which
>>uses some XML-parsing, which I have already tested in a
>>standalone command-line program and found to be working OK.
>>
>>However, the servlet generated this error,
>>"java.lang.LinkageError: loader constraints violated when linking
>>org/xml/sax/InputSource class"
>>
>>which I believe means that the Tomcat class loader is finding
>>two conflicting org.xml.sax.InputSource classes (and possibly
>>associated libraries).
>>
>>This was my big worry with adding XML libraries to my operating
>>system, that they would clash with Tomcat's to stop functioning.
>>How should I have arranged things to make this work ?
>>
>>I put all the JAXP libraries in c:\jdk1.3\jaxp-1.2_01 and added
>>them to the CLASSPATH so that I can easily compile all XML programs
>>without defining where to find the Sax libraries and classes,
>>because my XML applications are not just for Tomcat.


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message