This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Which jar contains net.sf.hibernate.cfg ???? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Which jar contains net.sf.hibernate.cfg ????" Watch "Which jar contains net.sf.hibernate.cfg ????" New topic
Author

Which jar contains net.sf.hibernate.cfg ????

samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
Hi all,
I am novice to Hibernate. I am tring to configure eclipse for hibernate but I am not able to execute
import net.sf.hibernate.cfg.*
as the eclips is not able to find the specified path.
It works fine till
import net.sf.hibernate.*;

But when I try to rt the statement
import net.sf.hibernate.cfg.*
its not able to get the requirs path.
Can anyone tell me which is that jar file which I need to put in the classpath so that the statement
import net.sf.hibernate.cfg.*
will gets executed properly.
thanks in advance
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

That package is in hibernate.jar. Be careful you are using the correct version of Hibernate; that particular package structure is from Hibernate 2, so you'll need to make sure you are using that version.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
thanks a lot for a quick reaply Paul ...
Paul ..I am using version 3.
So which jar file I need to keep in the class path . and where can I find that jar file . Please let me know the same.
I already kept my hibernate3.jar file in the classpath
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Well, you'll need the jar files you downloaded in the classpath.


I already kept my hibernate3.jar file in the classpath

That's good, however you'll have to start using the version 3 code rather than trying to use version 2 classes if you want that to work.
samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
Thanks a lot Paul for ur valuable guidance .....
I tried using the code that suits for the version 3 and that works well....
Thank you once again

Regards
Samir ware
 
jQuery in Action, 2nd edition
 
subject: Which jar contains net.sf.hibernate.cfg ????
 
Similar Threads
Class HibernateUtil cannot be resolved
Problem with J2ME XML Parsing
package net.sf.hibernate does not exist
Class instantiation error
Getting ClassDefNotFound Exception while using Hibernate3.jar