Greetings,
I am running out of an intermittent issue where war file is not completely unpacked and
tomcat starts loading of classes/resources. As war file is only partially unpacked, therefore all the resources are not available for loading. In my case, I get ClassNotFoundException while class is there inside war file in WEB-INF/lib location but it was not unpacked. This issue doesn't occur every time but happens only once in a while. In my case, I see following errors in the log files:
catlina.log:
SEVERE: Error listenerStart
May 16, 2012 11:04:41 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors
localhost.log
INFO: Initializing Spring root WebApplicationContext
May 16, 2012 11:04:40 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/quartz/SchedulerException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getDeclaredConstructors(Unknown Source)
at org.springframework.beans.factory.annotation.AutowiredAnnotati
Excerpts of 'server.xml' :
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="/myapp" docBase="myapp" />
<Context path="" docBase="myapp" />
Actually, I want to have two context roots. one is default [/] and another one is [myapp] so that I can access my application either with
http://localhost:8080 or
http://localhost:8080/myapp.
I observed that in the webapps directory two directories are created at the time of tomcat starts . One is
ROOT and another one is
myapp. But whenever the problem occurs, ROOT directory doesn't have all the contents of .war file which I think leads to the problem.
Tomcat version: 6.0.35
OS: Redhat 5.4
I don't know why .war file is not unpacked completely. Any help is highly appreciated.