I've got three third party jar files in the WEB-INF/lib directory of my web
aplication that contain different versions of the same classes. I need to
explicitly state the order in which the classloader searches these jars in
order for my web application to work correctly. Can this be done by
From: Tait E Larson [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 10:56 AM
Subject: explicit ordering of jars searched by classloader in web
application
I've got three third party jar files in the WEB-INF/lib directory of my
web
aplication that contain different versions of the same
Howdy,
It's not a good idea to have more than one version of a class visible to
the class loader. Various bad things happen, like
ExceptionInInitializerError, LinkageError, and NoSuchMethodException and
the likes.
One of the reasons tomcat doesn't look at the CLASSPATH environment
variable, for
alternatively you can unpack the jar files, delete the older conflicting
classes, and repackage to avoid these conflicts. I've had to do this on
occasion.
Charlie
-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 2:49 PM
To:
I'm not as concerned with portability. I'd like to get this guy up and
running.
I tried merging jars into one single jar. Unfortunately the manifest file
contain Message Digests for each class.
I tried setting the classpath in st
|-+
| |
Sorry guys. That was an unfinished email I accidentally sent out.
I attempted to merge the jars. When I ran a standalone program which had
previously worked when I explicitly set the correct classpath with only the
new jar in the classpath I got the following error:
When I created the jar with 'jar cf' it overwrote the manifest.mf file that
I needed. I used 'zip' to create the jar instead. Everything is better
now.
Thanks for the help.
Tait
|-+
| | Tait E |
| |
From: Tait E Larson [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 2:06 PM
Subject: Re: explicit ordering of jars searched by classloader in web
application
Sorry guys. That was an unfinished email I accidentally sent out.
I attempted to merge the jars. When I ran a standalone program