0

Hi all,
I saved my connector/j jar file into this location C:\ ... \Java\jre6\lib\ext as well as in $CATALINA_HOME/common/lib and i am using this code in the JSP :

Class.forName("com.mysql.jdbc.Driver").newInstance();

I am getting below driver error message. Somebody please help me out.

javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

My jar file name is mysql-connector-java-5.1.13-bin.jar.

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by peter_budo
0

Classic example of clashing multiple drivers locations.

Never mess around with Java installation directory!

Meaning delete that driver out of C:\ ... \Java\jre6\lib\ext and keep it either in server common library, Tomcat 5 and lower versions TOMCAT_DIRECTORY/common/lib, Tomcat 6 TOMCAT_DIRECTORY/lib or have it in project library folder TOMCAT_DIRECTORY/webapps/YOUR_PROJECT/WEB-INF/lib.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.