1

I am trying to create a my first hibernate application in these application by using hibernate tool i am trying to create cfg.xml file but in these file Driver class is "org.gjt.mm.mysql.Driver" itis coming default for MYSQL 5 but while doing hibernate code generation configuration it's throwing the exception that driver ClassNotFound exception

reevesy
  • 3,452
  • 1
  • 26
  • 23
Pranali
  • 105
  • 3
  • 13

2 Answers2

1

See this post.

What is the jdbc driver "org.gjt.mm.mysql.Driver" for?

You need to download correct mysql connector and put it on your classpath as the one you are using (org-gjt-mm-mysql-driver) is very old

And change your hibernate configuration to use it.

Community
  • 1
  • 1
reevesy
  • 3,452
  • 1
  • 26
  • 23
  • I am now trying to use these driver com.mysql.jdbc.Driver but now i got error as in hibernate code generation configuration their is some problem in path of output directory – Pranali Feb 29 '12 at 11:21
0

Make sure that the jar file containing the driver is in your classpath when you run the hibernate tool.

nwinkler
  • 52,665
  • 21
  • 154
  • 168