My build process builds and copies a .war file to $TOMCAT_HOME/webapps. 75% or more of the time, this works fine. But every now and then, the catalina.log file will show the following, and then all the apps deployed on Tomcat are totally stuck:
Oct 1, 2009 3:33:30 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/lucidity]
Oct 1, 2009 3:33:30 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive lucidity.war
Oct 1, 2009 3:33:32 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/Users/ptomblin/apache-tomcat-6.0.20/webapps/lucidity/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Oct 1, 2009 3:33:32 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load java.net.BindException. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
at com.mysql.jdbc.CommunicationsException.<init>(CommunicationsException.java:155)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2652)
at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1345)
at com.mysql.jdbc.Connection.realClose(Connection.java:4784)
at com.mysql.jdbc.Connection.cleanup(Connection.java:2040)
at com.mysql.jdbc.Connection.finalize(Connection.java:3296)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.
Is there some other way I should be loading this WAR file into Tomcat?