Actually classes in common/lib or common/classes are visible to all webapps and tomcat internals.

From your original post, the only org.apache.commons.collections.SequenceHashMap you had was in the admin webapp and that's not visible to tomcat internals or any other webapp. All the other SequenceHashMaps you had listed were in other packages and didn't match the full package and class name the error referred to. In that sense, there are no conflicting versions.

Now given you have commons-collections in the admin app, you probably can't put that in common/lib as it'll cause problems with the admin webapp ... if you use it. If you don't use the admin webapp at all (and I most certainly don't -- it's not well coded and hasn't been properly maintained in a long tome), go ahead and drop the package for the admin webapp and that'll free you to put commons-collections-[version].jar on common/lib. I personally recommend you keep as many of the libraries your webapp needs as possible in it's own WEB-INF/lib directory. It makes for a larger .war file, but fewer headaches down the road. If you use tomcat's database pooling, the database driver has to be in common/lib to be visible to both your webapp and tomcat's internal code. That's pretty much the only caveat.

--David

[EMAIL PROTECTED] wrote:
I agree that you should place the classes in your webapp WEB-INF..Common/lib
is for internal use and wouldnt be expected to demand load the classes you
require as is the case for the webapp WEB-INF
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

Anyone?
M--
----- Original Message -----
Wrom: JEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCG
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Sunday, December 02, 2007 9:30 AM
Subject: Re: java.lang.NoClassDefFoundError:
org/apache/commons/collections/SequencedHashMap


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Robinson wrote:
Caldarale, Charles R wrote:
Wrom: PKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZ
Subject: java.lang.NoClassDefFoundError:
org/apache/commons/collections/SequencedHashMap

I think I've installed all the correct jars (mostly via
jpackage and CentOS yum repos)
And therein lies the problem, most likely.  Throw away the 3rd-party
repackaged garbled version of Tomcat, and download a proper one from
tomcat.apache.org.  There are numerous issues in trying to straighten
out the repackaged junk.

 - Chuck
Ok Chuck, but I'm bound by other restrictions here. i.e. packaged
software.
The manager webapp works a treat as does the admin webapp. As far as
tomcat is
concerned, it's up and running and ticking away nicely. The problem I
have is
deploying a webapp on an updated version of tomcat.

I have found a solution:

Copy the commons-collections-3.2.jar to the WEB-INF/lib but I'm still not
sure
why the ${CATALINA_HOME}/common/lib version isn't picked up via tomcat.

Anyone?

Thanks,

Tom


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org

iD8DBQFHUsGSTTfAzopMt6cRAm7KAJ9jTJU9tlWCyzkjui0Ax9GkA7xBsQCdFIic
c6RrvR4BiV3ZNM4fTrAYq4k=
=91yz
-----END PGP SIGNATURE-----

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




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



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

Reply via email to