Hi,
Caldarale, Charles R wrote:
The problem I have is that occasionally after I restart Tomcat, the
startup fails with NoClassDefFoundError or ClassNotFoundException for
every servlet listener that's being added from web.xml.
This kind of error can be caused by having the same class(es) in multiple
locations in a given branch of the classloader tree, such as in both a webapp's
WEB-INF/lib and in Tomcat's lib directory (or on the system classpath). Have
you checked that?
I removed the obvious suspect, a duplicate postgresql driver that
appeared in both WEB-INF/lib and [tomcat install dir]/lib.
Unfortunately this did not seem to help. Last night I needed to restart
the production server for a configuration change and I needed 22(!)
restarts for Tomcat to start up correctly.
It really seems that there's a race condition going on somehow. I mean,
if it was a structural problem then Tomcat would simply never start up,
wouldn't it?
These are the libraries the web app currently uses:
In WEB-INF/lib
slf4j-jdk14-1.5.2.jar
slf4j-api-1.5.2.jar
regexp.jar
quartz-1.5.2.jar
jnp-client.jar
jbosssx-client.jar
jbosssx-as-client.jar
jboss-security-spi.jar
jboss-remoting.jar
jboss-logging-spi.jar
jboss-j2ee.jar
jboss-integration.jar
jboss-ejb3-security-client.jar
jboss-ejb3-proxy-client.jar
jboss-ejb3-core-client.jar
jboss-ejb3-common-client.jar
jboss-common-core.jar
jboss-client.jar
jboss-aspect-jdk50-client.jar
jboss-aop-client.jar
hibernate-annotations.jar
concurrent.jar
commons-logging-1.0.4.jar
commons-digester-1.6.jar
commons-collections-3.1.jar
commons-beanutils-1.7.0.jar
In [tomcat install dir]/lib
mail.jar
activation.jar
postgresql-8.3-603.jdbc3.jar
The Jboss libraries are the Jboss client libraries and are needed to
consume EJBs from a remote Jboss AS instance. Maybe there are some
classes somewhere that conflict with those of Tomcat, but if that would
be true it's still hard to understand why starting up fails in
production but never on a local workstation.
Anyone has any idea?
Grtz,
Arjan
--
It's a cult. If you've coded for any length of time, you've run across someone
from this warped brotherhood. Their creed: if you can write complicated code,
you must be good.