First of all, be sure to have the jar containing the driver in the classpath. If you do not have the jar, you can download it from http://mvnrepository.com/artifact/mysql/mysql-connector-java
JDBC driver class not found error in struts-hibernate integration project
Question
I am working on struts-hibernate integration project. When I enter data in input JSP, the output JSP shows text result as data stored in database. But actually no data is getting stored & showing the following error
:
org.hibernate.HibernateException: JDBC Driver class not found: com.mysql.jdbc.Driver
1 more thing I wanna ask is a new window has popped up titled as"JLoEndpoint.class"
which had message as source not found with
- The JAR file C:\program files\apache-tomcat-7.0.47\lib\tomcat-coyote.jar
has no source attachment. What can I do?
No correct solution
OTHER TIPS
You need to download jar containing com.mysql.jdbc.Driver
you can download jar from here and set your classpath
Seems like you have not included the com.mysql.jdbc.Driver into the class path of your project. 1.First download the mysqldriver 2.if you are using the eclipse than go to Project->BuildPath->Configure Buil path -> Libraries Tab - > Add external jar and than select the mysql driver jar which you have downloaded 3. Rebuild or clean the project 4.Deploy the project again.