-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: JDBC Driver class not found: com.mysql.jdbc.Driver
PostPosted: Thu May 10, 2012 8:13 am 
Newbie

Joined: Thu May 10, 2012 7:52 am
Posts: 1
I have a problem with configuration of hibernate when i run the class test

May 10, 2012 5:14:49 PM net.sf.hibernate.dialect.Dialect <init>
INFO: Using dialect: net.sf.hibernate.dialect.MySQLDialect
May 10, 2012 5:14:49 PM net.sf.hibernate.connection.DriverManagerConnectionProvider configure
INFO: Hibernate connection pool size: 20
May 10, 2012 5:14:49 PM net.sf.hibernate.connection.DriverManagerConnectionProvider configure
SEVERE: JDBC Driver class not found: com.mysql.jdbc.Driver
Exception in thread "main" net.sf.hibernate.HibernateException: JDBC Driver class not found: com.mysql.jdbc.Driver
at net.sf.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:57)
at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:76)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:161)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:613)
at hh.CreateTest.main(CreateTest.java:14)



I have "mysql-connector-java-5.1.13-bin.jar" and hibernate.properties is:

hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost/test
hibernate.connection.username=test
hibernate.connection.password=test


Please Help.


Top
 Profile  
 
 Post subject: Re: JDBC Driver class not found: com.mysql.jdbc.Driver
PostPosted: Fri May 11, 2012 2:19 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Which version of hiberante are you using?
Please also ensure that mysql-connector-java-5.1.13-bin.jar is referenced by your classpath
and verify if mysql-connector-java-5.1.13-bin.jar effectively contains class com.mysql.jdbc.Driver


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.