As The Crow Flies

« Install complete! | Main | Pinnacle Studio... »
Thursday Feb 08, 2007

Tomcat 5.5.20 issue

Boy, this issue sure through me for a loop for a few hours.  i had an application that was deployed and running fine under Tomcat 5.5.9, but when i deployed to my ISP which had Tomcat 5.5.20 installed it would never load.  It kept throwing:

SEVERE: Error deploying web application directory myApp
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1815)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:869)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1322)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1034)

Well since i was doing the initial configuration of the server at the ISP i wanted to make sure i had everthing installed correctly.  i saw servlet-api.jar was where it supposed to be.  So i went back and started checking classpaths.  They looked good.  i did some testing with other webapps.  They looked good.  After doing some more poking around and experimenting, i finally decided to start ripping out things that would be used upon deployment/start-up of a webapp.  That lead me to my META-INF/context.xml where i ultimately found the problem.  i had <Loader delegate="false" /> defined.  i wasn't really using it and according to the Tomcat5 docs, this is the default setting so i left it in there, yet when i removed this my app would deploy.

Now i don't fully understand why this is a problem, but if you run across this error in this situation, hopefully this note will save you some time, and more importantly, some grief.

Maybe i should contact the Tomcat team and they could tell us what's up.  We'll see.

Comments:

Post a Comment:
  • HTML Syntax: Allowed