tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <>
Subject Re: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Date Sun, 02 Dec 2007 17:46:17 GMT
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 

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 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
> Anyone?
> M--
> ----- Original Message -----
> To: "Tomcat Users List" <>
> Sent: Sunday, December 02, 2007 9:30 AM
> Subject: Re: java.lang.NoClassDefFoundError:
> org/apache/commons/collections/SequencedHashMap
>> Hash: SHA1
>> Tom Robinson wrote:
>>> Caldarale, Charles R wrote:
>>>>> 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
>>>>  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
>> Version: GnuPG v1.4.7 (GNU/Linux)
>> Comment: Using GnuPG with CentOS -
>> iD8DBQFHUsGSTTfAzopMt6cRAm7KAJ9jTJU9tlWCyzkjui0Ax9GkA7xBsQCdFIic
>> c6RrvR4BiV3ZNM4fTrAYq4k=
>> =91yz
>> -----END PGP SIGNATURE-----
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail:
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message