tags:

views:

414

answers:

4

I have installed MySQL Server 4.1 and mysql-connector-java-3.0.17-ga. I have the JSP code just to establish a connection. When I try to execute it, it throws java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. Which file am I missing and where should I place it? Thanks in advance.

+1  A: 

WEB-INF/lib

or

your server lib

l_39217_l
Which file should I want to place?
you want to place the mysql connector jar file in there
ShaneB
mysql-connector-java-3.0.17-ga.jar
l_39217_l
A: 

The server has its own library of jars at run time. You need to put the msql jdbc jar file in the WEB-INF/lib folder, so that at runtime the tomcat install can find and load it. Anyway, check which class is throwing the exception, and make that class exist in the app-server's library folder.

Karl
A: 

I did it but still it's throwing the same exception.

A: 

I got it guys. Just restarted the tomcat and its working fine. Thanks for all your responses.