• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate : jdbc driver not found ?

 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys :

Im killing myself trying to figure out why hibernate (im
using the JBoss eclipse plugin) cant find my jdbc driver
for mysql (com.jdbc.mysql.Driver).
Ive included the driver in the project and added it to the build path.

The actual message :

org.hibernate.console.HibernateConsoleRuntimeException: Problems while loading database driverclass (com.jdbc.mysql.Driver)
org.hibernate.console.HibernateConsoleRuntimeException: Problems while loading database driverclass (com.jdbc.mysql.Driver)
java.lang.ClassNotFoundException: com.jdbc.mysql.Driver


please help !
 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My apologies - it was actually supposed to be com.mysql.jdbc, I have
corrected that and now have an even MORE puzzling error :

Now, eclipse sais "an internal error occured while fetching children of ...", when I click on the Hibernate Configurations view and try
to expand the configuration tree.
 
Jignesh Patel
Ranch Hand
Posts: 626
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in your hbm.xml file make lazy=true
 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi thanks :

what is the hbm.xml file ? I only see hibernate.cfg.xml
Thanks!!!

-j
 
Aravindan Ramkumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HBM is Hibernate Mapping File. This file will be present for every object you are retrieving from the database.
 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi and thanks:

Okay now I see. Well I was hoping that the hbm files could be autogenerated based on the schema. Is this possible ? I assumed that the JBoss eclipse plug in library would do so for me. If not, are there some tools that do ?

Thanks

Jay
 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I finally fixed the bug: When I used an older connector for mysql, on accident, the damn thing worked ! I fixed it by using mysql connector 3.1.12 instead of 3.1.13

So can somebody tell me why it is that using an older mysql connector worked ? I would really like to know....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic