tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <>
Subject Re: TC4's classloader choking on xerces.jar (maybe)
Date Sat, 20 Jan 2001 17:15:42 GMT
On Wed, 17 Jan 2001, Craig R. McClanahan wrote:
> Consider the following scenario - I put a copy of the Postgres JDBC
> driver (just to show that it's not specific to xml parsers :-) in my
> shared library directory, because lots of my apps need it.  But, one
> of my webapps needs a different version of the Postgres driver,
> because it depends on a new feature that was implemented in a later
> version.  So, I put the new driver file in the WEB-INF/lib directory
> of my webapp, and install it in Tomcat.
> Under Tomcat 3.2, the newer driver is ignored (because it's got the
> same class names).  Under Tomcat 4.0, the newer driver is respected
> for that webap -- all others continue to use the shared one.

	There is still the "sealing" issue, right?  Certain libraries
cannot be loaded in more than one ClassLoader, and are marked as "sealed"
in the Manifest.  If you put one in the Tomcat lib and another in the
webapp lib, you'll get cryptic "Sealing Violation" exceptions.  I think
some of the XML JARs do this (JAXP, perhaps?).
	I don't have a full understanding of this, though.  Perhaps it
only breaks if loaded more than once in serial ClassLoaders not parallel
ones.  But I think tomcat's lib is sill in serial with webapp lib, right?


View raw message