- This topic has 4 replies, 3 voices, and was last updated 19 years, 9 months ago by
agenturs.
-
AuthorPosts
-
agentursMemberBEWARE: I’m a newbie and so far still completely ignorant to java and J2EE.
I’m trying to work through some tutorials to get introduced to the java enviroment.
By working through the database/hibernate tutorial I get stuck at the import in VipService.java (frame 209) with the above message on the following lines of code:
import net.sf.hibernate.HibernateException;
import net.sf.hibernate.ObjectNotFoundException;
import net.sf.hibernate.Query;
import net.sf.hibernate.Session;I run MyEclipse 4.0 Milestone 2 on Eclipse 3.1 on Mac OS X 10.4 Tiger.
I know that the tutorial was made with an earlier version of MyEclipse.
Does that have any influence? Where should net.sf.hibernate be? Should those classes have been created with adding hibernate capabilities?
Any help is appreciated. If I missed a topic or documentation covering this, please forgive me. Just point me to it and I keep trying…
Thanks
Jean-Marie
Riyad KallaMemberJean-Marie,
You might just be missing the Hibernate.jar file from your build path. Right click on your project root, go down to Properties then click “Java Build Path” then click the “Libraries” tab and click “Add”, then navigate down into your project and find the hibernate.jar file, select it and hit OK. Do the errors go away?
agentursMemberRiyad,
I checked the libraries and found
hibernate3.jar – BasicDB/WebRoot/WEB-INF/lib
No need to add…
There is a hibernate3.jar in the root of the project but I can’t access it with Add JARs because there is only the other Project JSFLoginDemo to choose from.
Error is still there.
Jean-Marie
Brian FernandesModeratorJean-Marie,
Our hibernate tutorial is for Hibernate 2, not Hibernate 3; you seem to have created a Hibernate 3 project.
While this is not really a big deal at an itroductory level, Hibernate 3 changes the package names from net.sf.hibernate.* to org.hibernate.*
Make that change in your files and you should be just fine.
Hope this helps,
Brian.
agentursMemberYep, that was it. I didn’t catch the automatic hibernate 3 selection. As soon as I changed net.sf to org the errors dissapeared.
Thanks a lot.
Jean-Marie
-
AuthorPosts