Zuqui
Zuqui

Reputation: 49

Hibernate: Unable to load class

Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [com.mysql.jdbc.Driver]

http://www.tutorialspoint.com/hibernate/hibernate_quick_guide.htm

I'm following the hibernate guide and i'm getting this error someone knows why?

Thanks for help.

Upvotes: 1

Views: 4138

Answers (1)

puj
puj

Reputation: 770

You need to grab the mysql connector jar from here and add it to your classpath. Perhaps your /lib folder

If you are using maven, try including

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

In your pom.xml

Upvotes: 2

Related Questions