java.lang.NoClassDefFoundError
means the runtime version of the class in the classpath is not the same as that at compile time.
Note: it's not a ClassNotFound
Your problem is in fact multiple versions of the class being found.
Update
I should have pointed out before Tomcat does not use the system CLASSPATH
. The values set there should get ignored.
http://www.chemaxon.com/jchem/doc/admin/tomcat.html shows anything you put into $CATALINA_HOME/lib
automatically gets into the server classpath at startup time.
The jars gets picked up by the shared.loader
or common.loader
property of /conf/catalina.properties
Mine reads
common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar
So I think the problem is that you might also have a copy of this class/jar in some other locations from which Tomcat builds it's classpath.
That is anything in WEB-INF/classes and in JARs under WEB-INF/lib in your deployment are in the CLASSPATH, along with JARs that are installed in lib for Tomcat 6.
Also see http://www.jarfinder.com/index.php/java/info/org.apache.commons.pool.impl.GenericObjectPool for a list of other jars containing the GenericObjectPool class, and remove ones other than commons-pool.jar
Update 2
Yes, you can remove the containing folder, and the jars will no longer be in the classpath.
However, I see you have these folders in classpath, do they contain any versions of these jars? Tomcat 6 puts everything in tomcat6/lib, there is no tomcat6/common/lib which is a relic from earlier Tomcat versions. I wonder if these have incorrectly been renamed from an earlier classpath entry ?
/var/lib/tomcat6/common/classes:
/var/lib/tomcat6/common/lib:
tomcat is older and very stable with solr in combination.
jetty is newer and is a bit more complicated to administer. jetty can be configured to run in many ways(embedded, diy by importing the class etc) as opposite to tomcat which has all predefined (logs, scripts, libraries etc).
it all depends on your confidence level in the end. i have tomcat and solr, but running as well jetty with other apps.
Best Answer
Have you tried building a war out of the directory? And then copying the package into '/usr/share/jetty/webapps' - directory.
Eg.
Hope this helps!