1

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 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.