You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tom Robinson <to...@constantstream.com> on 2007/12/01 01:23:52 UTC
java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Hi,
I'm having some trouble with a new tomcat5 setup. The webapp works on another
host with the following setup:
CentOS 4
OK - Server info
Tomcat Version: Apache Tomcat/5.0
OS Name: Linux
OS Version: 2.6.9-55.0.9.ELsmp
OS Architecture: i386
JVM Version: 1.4.2_10-b03
JVM Vendor: Sun Microsystems Inc.
I think I've installed all the correct jars (mostly via jpackage and CentOS yum
repos) but on the new host with the following configuration I get the errors
pasted at the bottom of this message:
CentOS 5
OK - Server info
Tomcat Version: Apache Tomcat/5.5.25
OS Name: Linux
OS Version: 2.6.18-8.1.15.el5xen
OS Architecture: i386
JVM Version: 1.6.0_03-b05
JVM Vendor: Sun Microsystems Inc.
The error is:
Nov 30, 2007 11:52:31 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter MainFilter
java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
When I search for the class in /var/lib/tomcat5 I can find the required class in:
./server/webapps/admin/WEB-INF/lib/[commons-collections].jar
9026 Tue Jan 01 00:00:00 GMT 1980
org/apache/commons/collections/SequencedHashMap.class
There are also two other versions from:
./common/lib/[commons-collections-tomcat5].jar
org/apache/tomcat/dbcp/collections/SequencedHashMap.class
and:
./common/lib/[commons-dbcp-tomcat5].jar
org/apache/tomcat/dbcp/dbcp/datasources/SequencedHashMap.class
Why do I have three versions and are they conflicting with each other? Should I
be looking somewhere else for the cause of the error?
Any help is appreciated.
Cheers,
Tom
---
Other Info:
[root@kennet tomcat5]# pwd
/var/lib/tomcat5
[root@kennet tomcat5]# list=`find -name '*.jar'`
[root@kennet tomcat5]# for j in $list
> do
> echo $j
> jar tvf $j | grep SequencedHashMap
> done
---8<--- snip ---8<---
./common/lib/[commons-collections-tomcat5].jar
1725 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/collections/SequencedHashMap$1.class
2151 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/collections/SequencedHashMap$2.class
2335 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/collections/SequencedHashMap$3.class
1859 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/collections/SequencedHashMap$Entry.class
2398 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/collections/SequencedHashMap$OrderedIterator.class
8932 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/collections/SequencedHashMap.class
./common/lib/[commons-dbcp-tomcat5].jar
1780 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/dbcp/datasources/SequencedHashMap$1.class
2216 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/dbcp/datasources/SequencedHashMap$2.class
2384 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/dbcp/datasources/SequencedHashMap$3.class
1811 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/dbcp/datasources/SequencedHashMap$Entry.class
2458 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/dbcp/datasources/SequencedHashMap$OrderedIterator.class
9057 Tue Jan 01 00:00:00 GMT 1980
org/apache/tomcat/dbcp/dbcp/datasources/SequencedHashMap.class
---8<--- snip ---8<---
./server/webapps/admin/WEB-INF/lib/[commons-collections].jar
1681 Tue Jan 01 00:00:00 GMT 1980
org/apache/commons/collections/SequencedHashMap$1.class
2099 Tue Jan 01 00:00:00 GMT 1980
org/apache/commons/collections/SequencedHashMap$2.class
2283 Tue Jan 01 00:00:00 GMT 1980
org/apache/commons/collections/SequencedHashMap$3.class
1843 Tue Jan 01 00:00:00 GMT 1980
org/apache/commons/collections/SequencedHashMap$Entry.class
2350 Tue Jan 01 00:00:00 GMT 1980
org/apache/commons/collections/SequencedHashMap$OrderedIterator.class
9026 Tue Jan 01 00:00:00 GMT 1980
org/apache/commons/collections/SequencedHashMap.class
---8<--- snip ---8<---
Errors:
INFO: HTMLManager: start: Starting web application at '/'
Nov 30, 2007 11:52:31 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.1.3
Nov 30, 2007 11:52:31 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Nov 30, 2007 11:52:31 PM org.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Nov 30, 2007 11:52:31 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Nov 30, 2007 11:52:31 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Nov 30, 2007 11:52:31 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
Nov 30, 2007 11:52:31 PM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource: hibernate.hbm.xml
Nov 30, 2007 11:52:31 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter MainFilter
java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
at org.hibernate.mapping.Table.<init>(Table.java:33)
at org.hibernate.cfg.Mappings.addTable(Mappings.java:165)
at
org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:299)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
at
org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
at
org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1296)
at
com.intelligentspace.parchment.servlet.MainFilter.<clinit>(MainFilter.java:36)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:208)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
at
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1173)
at
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:545)
at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:159)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Nov 30, 2007 11:52:31 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Nov 30, 2007 11:52:31 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
--
Thomas Robinson -
Infrastructure, Integration, Support, Development and Training
Linux, Oracle, Windows, Networking
Daedalus Compass Ltd Mobile: +44 (0)7879 428 968
132 Clifden Court, Clifden Road Work: +44 (0)20 8891 6262
Twickenham, Middlesex, TW1 4LR Fax: +44 (0)20 8891 6363
United Kingdom GPG Key: 8A4CB7A7
CONFIDENTIALITY: Copyright (C). This message with any appended or
attached material is intended for addressees only and may not be
copied or forwarded to or used by other parties without permission.
---------------------------------------------------------------------
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: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by Konstantin Kolinko <kn...@gmail.com>.
> I'm still not sure
> why the ${CATALINA_HOME}/common/lib version isn't picked up via tomcat.
>
> ./server/webapps/admin/WEB-INF/lib/[commons-collections].jar
> ./common/lib/[commons-collections-tomcat5].jar
> ./common/lib/[commons-dbcp-tomcat5].jar
org/apache/commons/collections/SequencedHashMap.class
org/apache/tomcat/dbcp/collections/SequencedHashMap.class
org/apache/tomcat/dbcp/dbcp/datasources/SequencedHashMap.class
-- please note that these are three _different_ classes: their packages differ.
The classes in ./common/lib/ are _not_ the ones that your web app was
looking for, as they are not in org.apache.commons.**, but in
org.apache.tomcat.**.
Please note, that Tomcat 5.0 is not supported any more, and no future
releases are planned for it, even for security issues. Have a look at
http://tomcat.apache.org/security-5.html
---------------------------------------------------------------------
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: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin,
mgainty@hotmail.com wrote:
> later on in the index.jsp attempt to use the log
> line 42 onMouseUp="<%log.debug("From index.jsp StringToEncrypt=");
>
> An error occurred at line: 42 in the jsp file: /index.jsp
> Generated servlet error:
> log cannot be resolved (but commons-logging.jar IS located in
> %CATALINA_HOME%\common\lib) so why did'nt the classloader find it?
This isn't a ClassNotFoundException, this is a "you didn't declare
'log'" error.
Can you give us the entire example JSP?
Finally, why are you trying to call server-side logging from a
javascript event handler?!
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHVB1Y9CaO5/Lv0PARAqZzAJ4n8VlalbKyhPWIO9raJLHDvJDIewCfUulS
wYrn5P292EvLROtFg63+mSk=
=U7Ao
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
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: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: mgainty@hotmail.com [mailto:mgainty@hotmail.com]
> Subject: Re: java.lang.NoClassDefFoundError:
> org/apache/commons/collections/SequencedHashMap
>
> Directory of %CATALINA_HOME%\common\lib
> 06/15/2004 08:29p 26,202 commons-logging-api.jar
>
> Directory of %CATALINA_HOME%\webapps\EncryptView\WEB-INF\lib
> 06/15/2004 08:29p 38,015 commons-logging.jar.old
> (unusable)
You can try putting commons-logging.jar (not commons-logging-api.jar) in
common/lib, and see what happens. However, this is not likely to work,
since commons-logging usually needs other classes often supplied by the
webapp (e.g., log4j-xxx.jar) in order to actually create a functional
logger - which is what's happening in your example. Moving these other
classes to common/lib can easily conflict with Tomcat's own logging,
causing Tomcat not to run at all. You should pick something simpler
(less dependencies) from your app to test with and move that jar or
class to common/lib.
- 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
Re: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by mg...@hotmail.com.
Directory of %CATALINA_HOME%\common\lib
06/15/2004 08:29p 26,202 commons-logging-api.jar
Directory of %CATALINA_HOME%\webapps\EncryptView\WEB-INF\lib
06/15/2004 08:29p 38,015 commons-logging.jar.old
(unusable)
/*lets create a jsp page which will call into that jar..*/
<%@ page contentType="text/html;charset=windows-1252"
import="org.apache.commons.logging.*" %>
later on in the index.jsp attempt to use the log
line 42 onMouseUp="<%log.debug("From index.jsp StringToEncrypt=");
An error occurred at line: 42 in the jsp file: /index.jsp
Generated servlet error:
log cannot be resolved (but commons-logging.jar IS located in
%CATALINA_HOME%\common\lib) so why did'nt the classloader find it?
lets re-enable commons-logging
%CATALINA_HOME%\webapps\EncryptView\WEB-INF\lib>ren *.jar.old *.jar
commons-logging.jar is now enables in
%CATALINA_HOME%\webapps\EncryptView\WEB-INF\lib
so commons-logging.jar in %CATALINA_HOME%\common\lib was completely missed
by the classloader but demand-loaded when placed in webappName\WEB-INF\lib
Is there a misconfig that I dont know about?
Environment:
TOMCAT 5.5.17
java version "1.5.0_02"
Martin
----- Original Message -----
Wrom: WIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGS
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Sunday, December 02, 2007 12:24 PM
Subject: RE: java.lang.NoClassDefFoundError:
org/apache/commons/collections/SequencedHashMap
> Wrom: WZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFD
> Subject: Re: java.lang.NoClassDefFoundError:
> org/apache/commons/collections/SequencedHashMap
>
> 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
Although the reference given is quite appropriate, the statements
preceding it are incorrect.
The common/lib location is not for Tomcat internal use; it provides a
location for classes that must be visible to *both* Tomcat and webapps,
such as the servlet API interfaces and JDBC drivers for connection
pooling.
And, of course, all classes are "demand loaded" on first reference,
regardless of location.
Placing application-specific classes in WEB-INF/lib is certainly the
right thing to do, since that contributes to webapp independence.
- 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
---------------------------------------------------------------------
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: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Tom Robinson [mailto:tom@constantstream.com]
> Subject: Re: java.lang.NoClassDefFoundError:
> org/apache/commons/collections/SequencedHashMap
>
> The WEB-INF/lib location works for my specific app
> and gives it independence from the admin app if that's
> using a different version. Placing it in commons/lib
> might confuse the other app.
No might about it. Any time the same class appears in more than one
location in a given branch of the classloader tree, you are highly
likely to hit an NCDFE or casting exception. A class file processed by
one classloader is distinct from the same class file handled by a
different classloader.
- 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
Re: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by Tom Robinson <to...@constantstream.com>.
Caldarale, Charles R wrote:
>> From: mgainty@hotmail.com [mailto:mgainty@hotmail.com]
>> Subject: Re: java.lang.NoClassDefFoundError:
>> org/apache/commons/collections/SequencedHashMap
>>
>> 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
>
> Although the reference given is quite appropriate, the statements
> preceding it are incorrect.
>
> The common/lib location is not for Tomcat internal use; it provides a
> location for classes that must be visible to *both* Tomcat and webapps,
> such as the servlet API interfaces and JDBC drivers for connection
> pooling.
>
> And, of course, all classes are "demand loaded" on first reference,
> regardless of location.
>
> Placing application-specific classes in WEB-INF/lib is certainly the
> right thing to do, since that contributes to webapp independence.
>
After reading that doc I agree with chuck. The WEB-INF/lib location works for my
specific app and gives it independence from the admin app if that's using a
different version. Placing it in commons/lib might confuse the other app.
Thanks,
Tom
---------------------------------------------------------------------
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: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: mgainty@hotmail.com [mailto:mgainty@hotmail.com]
> Subject: Re: java.lang.NoClassDefFoundError:
> org/apache/commons/collections/SequencedHashMap
>
> 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
Although the reference given is quite appropriate, the statements
preceding it are incorrect.
The common/lib location is not for Tomcat internal use; it provides a
location for classes that must be visible to *both* Tomcat and webapps,
such as the servlet API interfaces and JDBC drivers for connection
pooling.
And, of course, all classes are "demand loaded" on first reference,
regardless of location.
Placing application-specific classes in WEB-INF/lib is certainly the
right thing to do, since that contributes to webapp independence.
- 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
Re: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by Tom Robinson <to...@constantstream.com>.
I'm beginning to see the light ;-) - I don't know how I overlooked the admin app
specific location. Thanks!
David Smith wrote:
> 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
>
> mgainty@hotmail.com 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" <us...@tomcat.apache.org>
>> Sent: Sunday, December 02, 2007 9:30 AM
>> Subject: Re: java.lang.NoClassDefFoundError:
>> org/apache/commons/collections/SequencedHashMap
>>
>>
>>
> 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
>
>
>>>
---------------------------------------------------------------------
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
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
> ---------------------------------------------------------------------
> 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
--
Thomas Robinson -
Infrastructure, Integration, Support, Development and Training
Linux, Oracle, Windows, Networking
Daedalus Compass Ltd Mobile: +44 (0)7879 428 968
132 Clifden Court, Clifden Road Work: +44 (0)20 8891 6262
Twickenham, Middlesex, TW1 4LR Fax: +44 (0)20 8891 6363
United Kingdom GPG Key: 8A4CB7A7
CONFIDENTIALITY: Copyright (C). This message with any appended or
attached material is intended for addressees only and may not be
copied or forwarded to or used by other parties without permission.
---------------------------------------------------------------------
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: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by David Smith <dn...@cornell.edu>.
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
mgainty@hotmail.com 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" <us...@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: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by Tom Robinson <to...@constantstream.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tom Robinson wrote:
> Caldarale, Charles R wrote:
>>> From: Tom Robinson [mailto:tom@constantstream.com]
>>> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by Tom Robinson <to...@constantstream.com>.
Caldarale, Charles R wrote:
>> From: Tom Robinson [mailto:tom@constantstream.com]
>> 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.
Any other clues?
Tom
--
Thomas Robinson -
---------------------------------------------------------------------
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: java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Tom Robinson [mailto:tom@constantstream.com]
> 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
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