You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brian Wawok <tu...@thetunaman.com> on 2008/01/11 16:10:27 UTC

Loading multiple versions of the same library

I have the following situation.

Tomcat 5.0 Server.

Program A is running on server, and needs axis 1.1 as a library.

Program B is running on the same server, and needs axis 1.4 as a library. 

Axis 1.1 and 1.4 are not backwards compatible... if I just put Axis 1.1 on
it.. program B won't work.. If I just put Axis 1.4 on it, program A won't
work.

Tomcat doesn't seem to like having the same jar loaded in twice (some
classes between the two obviously overlap).

How do I make this all work? I really don't want to have to try to manually
convert a large application from using 1.1 to 1.4 or vice versa, want to try
to make them both work...
 

The only thing I have tried so far, is to bundle in axis 1.4 with program by
manually putting all the classes in the jar. This did not seem to accomplish
anything..


Thanks for the help!




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Loading multiple versions of the same library

Posted by Peter Crowther <Pe...@melandra.com>.
> From: Brian Wawok [mailto:tunaboo@thetunaman.com]
> Tomcat 5.0 Server.
>
> Program A is running on server, and needs axis 1.1 as a library.

Is "program A" packaged as a WAR, with the Axis 1.1 libraries in the WAR?  If not, it should be.

> Program B is running on the same server, and needs axis 1.4
> as a library.

Is "program B" packaged as a WAR, with the Axis 1.4 libraries in the WAR?  If not, it should be.

> Axis 1.1 and 1.4 are not backwards compatible... if I just
> put Axis 1.1 on
> it.. program B won't work.. If I just put Axis 1.4 on it,
> program A won't work.

What do you mean by "put axis 1.1 on it"?  Where are you putting these libraries, if not in a WAR?

> Tomcat doesn't seem to like having the same jar loaded in twice (some
> classes between the two obviously overlap).

Tomcat is explicitly *designed* to allow this.  Each webapp has its own classloader.  This relies on you creating your "programs" as webapps.  Have you done this?  If not, why not?

> How do I make this all work? I really don't want to have to
> try to manually
> convert a large application from using 1.1 to 1.4 or vice
> versa, want to try
> to make them both work...
>
>
> The only thing I have tried so far, is to bundle in axis 1.4
> with program by
> manually putting all the classes in the jar. This did not
> seem to accomplish
> anything..

Read up on webapps.  Package your "programs" as webapps.  Deploy each of them separately.  You may need to do a fair bit of reading if you're new to Tomcat and have never created one of these before, but it's reading you'll have to do if you want to use an application container such as Tomcat.

                - Peter

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Loading multiple versions of the same library

Posted by Brian Wawok <tu...@thetunaman.com>.

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Friday, January 11, 2008 10:22 AM
To: Tomcat Users List
Subject: RE: Loading multiple versions of the same library

> From: Brian Wawok [mailto:tunaboo@thetunaman.com] 
> Subject: Loading multiple versions of the same library
> 
> Tomcat 5.0 Server.

Deprecated, but still in common use.  Better if you could move to 5.5 or
6.0.


> Program A is running on server, and needs axis 1.1 as a library.
> Program B is running on the same server, and needs axis 1.4 
> as a library. 

Make sure the axis jars are not in common/lib, but rather in each
webapp's WEB-INF/lib directory.  This gets them processed by separate
classloaders, so they shouldn't conflict.

 - Chuck



Hi,

We are using a very large Enterprise content management system. This version
of the CMS is built upon Tomcat 5.0. It is many months work to convert to a
newer version of the CMS, so we haven't yet. I am not fond of Tomcat 5.0
either, but there is not a choice, the CMS is tied into a modified Tomcat.

Moving the libs to web-inf/lib makes sense, I have a .WAR for each
application, I will just take all axis out of the common/lib and bundle
separately with each program that needs it.

Thanks!


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Loading multiple versions of the same library

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Brian Wawok [mailto:tunaboo@thetunaman.com] 
> Subject: Loading multiple versions of the same library
> 
> Tomcat 5.0 Server.

Deprecated, but still in common use.  Better if you could move to 5.5 or
6.0.

> Program A is running on server, and needs axis 1.1 as a library.
> Program B is running on the same server, and needs axis 1.4 
> as a library. 

Make sure the axis jars are not in common/lib, but rather in each
webapp's WEB-INF/lib directory.  This gets them processed by separate
classloaders, so they shouldn't conflict.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org