tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Robinson <...@constantstream.com>
Subject java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
Date Sat, 01 Dec 2007 00:23:52 GMT
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


Mime
View raw message