Home  >  Forum  >  Hibernate
Post New Query

java.sql.SQLException: No suitable driver found for jdbc:mysql


joined on
March 27,2014
Asked on May 11,2014
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test
	java.sql.DriverManager.getConnection(DriverManager.java:689)
	java.sql.DriverManager.getConnection(DriverManager.java:208)
	org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173)
	org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:276)
	org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297)
	org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
	org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
	org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
	org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1263)
	com.concretepage.dao.UserDao.saveUserDetail(UserDao.java:12)
	com.concretepage.action.ResultAction.execute(ResultAction.java:25)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:483)
	
How to resolve it.
joined on
March 14,2013
Replied on June 09,2014

Check for 

<property name='connection.driver_class'>com.mysql.jdbc.Driver</property> 

in hibernate.cfg.xml

and jar

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

Write Answer



Sitewide-Feb4of4234x60





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