views:

32

answers:

2

When I try to deploy my Spring application to Tomcat, it gives me errors (localhost-{date}.log) saying I'm missing commons-pool-{version}.jar.

However, the source code is part of a STABLE release. I'm using maven to build and I've successfully built and deployed this project successfully (earlier today, in fact). So something must have changed locally. I added commons-pool-{version}.jar to my CLASSPATH, and that did not work. I've ensured the code hasn't changed by doing a fresh checkout.

My localhost log file says

Sep 15, 2010 11:15:39 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/apache/commons/pool/impl/GenericObjectPool

My catalina log file says

SEVERE: Error listenerStart
Sep 15, 2010 11:15:39 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/app] startup failed due to previous errors 

Are there any additional settings I'm overlooking? What else could it be? I'm stumped.

+1  A: 

You can check whats on your webapp classpath by opening your war file as a zip and inspecting the WEB-INF/lib directory. You should see a version of commons-pool in there. You can use IZArc (freeware) to open archive files.

Jon Freedman
A: 

You can either add the missing jar files in your:

WebApp WEB-INF/lib directory, or TomcatHome/lib directory (please note that this jar will be loaded for all your webapps if placed here).

If you feel really extreme you can add the required jars to your Java CLASS_PATH.

Cool.

Koekiebox
Also check that the requested class files are in the jar file you are using.
Koekiebox