-->
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.  [ 4 posts ] 
Author Message
 Post subject: Change Driver class for MySQL
PostPosted: Thu Apr 13, 2006 2:55 pm 
Newbie

Joined: Thu Apr 13, 2006 2:41 pm
Posts: 3
Hi!

I am just new to Hibernate Tool for eclipse and I am trying to create a hibernate.cfg.xml file. My problem is that when I am using the Wizard, I choose MySQL as Database dialect and the only option that I can choose for Driver class is org.gjt.mm.mysql.Driver. I would like to use com.mysql.jdbc.Driver like driver but I have no clue how to that. If I edit the generated file and add com.mysql.jdbc.Driver manually, when I try to open the Hibernate Code Generation wizard, I get a unable to load driver exception.

Any ideas?

Hibernate version: 3.1.3

Eclipse version: 3.1.1

Hibernate Tools version: 3.1.0-beta4

Name and version of the database you are using: MySQL 5.0.19


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 4:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you do know that you can just edit the comboboxes directly in the wizard, right ?

And for the driver issue then remember to add the driver to the console configuraiton classpath.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 5:04 pm 
Newbie

Joined: Thu Apr 13, 2006 2:41 pm
Posts: 3
Thanks for the answer!
You comment has suggested me some ideas that I would like to share.
max wrote:
you do know that you can just edit the comboboxes directly in the wizard, right ?

Uhm ... Yes, I have type there the driver that I would like to use: com.mysql.jdbc.Driver
max wrote:
And for the driver issue then remember to add the driver to the console configuraiton classpath.

These three words, console configuraiton classpath, suggest different things for me:
    Do you mean when you run, for instance, ant(console) and you add the library to the classpath?
    Or do you mean that there is a Hibernate Console or something similar and I can add my driver just there?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 5:06 pm 
Newbie

Joined: Thu Apr 13, 2006 2:41 pm
Posts: 3
Sorry for the silly answer!

I have found what you said! It was in front of my face! There is a Hibernate Console Configuration that was what I hoped to find!

Thanks a lot


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.