tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Interesting (?) classloader problem
Date Wed, 03 Sep 2003 13:04:12 GMT

I saw from the other messages you already have a workaround, but here's
another suggestion anyways: take the xerces that comes with tomcat and
put it in $CATALINA_HOME/server/lib.  Take the one your app needs and
put it in the endorsed directory.  See what happens ;)

But as you yourself said, the better course is to upgrade to the 2.x
branch of xerces, which is now stable, mature, fast, robust, etc etc

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: Jon Skeet []
>Sent: Wednesday, September 03, 2003 3:58 AM
>To: Tomcat User List (E-mail)
>Subject: Interesting (?) classloader problem
>As observant readers will have noticed, I'm migrating a webapp or two
>Tomcat 3.2.3 to Tomcat 4.1. Now, our apps have a very specific version
>Xerces that they currently need to use (although I'm hoping this
>requirement will go away). I believe the version is "Xerces-J 1.4.4"
>least according to the SourceSafe history). Now, that sounds
>out of whack with what Tomcat ships with, and my guess is that Tomcat
>well not be able to work properly with the version we need. (I would
>try it, but there's always a good chance that there'll be something
>away which doesn't get tested.)
>I can stick the version of xerces.jar in my webapp's lib directory, but
>according to the documentation, everything in org.apache.xerces (and
>org.xml.sax and org.w3c.dom) packages gets delegated to the parent
>classloader, which obviously wouldn't help me as I'd pick up the newer
>version of Xerces instead of the one I need.
>There's also another wrinkle which means I need to load xerces.jar
>any of the other jar files in webapps/lib. I can't remember where
>this requirement comes from, but I suspect it's due to some other
>we use having its own version of xerces (or maybe just the XML API)
>I can clearly modify the WebappClassLoader source to get rid of the
>delegation for org.apache.xerces: what would be the downside of this?
>does the documentation even say you can override common/lib/xerces.jar
>putting xerces.jar into webapps/lib, when it's going to delegate
>The business about loading xerces.jar first is slightly thorny - I
>the best solution may be to just find out which other jar file contains
>other/wrong classes and take them out, but I'd be interested to hear
>other solutions.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

View raw message