• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hibernate : jdbc driver not found ?

 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi thanks :

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

-j
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic