Home  >  Forum  >  Spring
Post New Query

Cannot load JDBC driver class 'com.mysql.jdbc.Driver'


joined on
November 18,2013
Asked on December 21,2013
Hi All,
 I am spring security test app. I am accessing user id and password  from database. While running application got the below error. 

Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'

I am using common dbcp to connect with my mysql. Guys  help me to solve it.

joined on
March 14,2013
Replied on December 21,2013

Check your pom.xml or lib directory for the  mysql-connector-java jar.

you can append below code snippet in you pom.xm

 <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.17</version>
       </dependency>

Write Answer








Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us