I am tring to configure a dynamic web project using eclipse helos. I use tomcat 6. When I add the libraries to the WebContent/lib it works fine. But I want to a folder called lib in the project's root level(root/lib). When I put my library files to that folder it builds fine. Run fine to the login page. When I try to log in it gives "java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool" Please help me with this.
1 Answer
You're creating a web app and deploying it as a WAR file in a Java EE container. That means that your deployment must follow the WAR standards. Put your JARs in WEB-INF/lib. The container will find them there.
Tomcat 6 and 7 have changed things up so JDBC driver JARs need to go in the server /lib directory. The app server expects to find them with its class loader. Try putting the MySQL JDBC connector JAR in /lib and see if that helps.
1 Comment
Adri w Ukraine
the same error can come from: commons-pool or/and a Db connector (ie. mysql-connector-java) dependency missing. see mail-archives.apache.org/mod_mbox/tomcat-users/200302.mbox/…