• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Class HibernateUtil cannot be resolved

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

I am trying to execute my first program on Hibernate. I am executing the HelloWorld program in the book "Java persistance with hibernate".
I have downloaded hibernate-distribution-3.5.2-Final i have taken all the jar files under the folder "hibernate-distribution-3.5.2-Final\lib\required" and added them to the class path

I am trying to execute the program



But i am getting the error Unable to resolve the class HibernateUtil. Please let help me in resolving this problem

Thanks in advance
Fierof2
 
Rahul somanath
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its a compile time exception that i am getting. The eclipse is not resolving the import statement.

I dont know under which jar is the HibernateUtil.java file is

The required folder under hibernate-distribution-3.5.2-Final-dist\hibernate-distribution-3.5.2-Final\lib\required contains the following jars

antlr-2.7.6.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
javassist-3.9.0.GA.jar
jta-1.1.jar
slf4j-api-1.5.8.jar
 
Rahul somanath
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have also added the hibernate3.jar file to the class path and i am still facing the same problem.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is your HibernateUtil class:

 
Rahul somanath
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thnaks a lot Subhendu.

Just now i came to know that tThe HibernateUtil is a separate Java file provided by the Book. I went to their site and got this file.

Instead of providing the java file you could have mention this info and it would have made me clear.

Thanks a lot for for the assistance.

Thanks and Regards
 
Subhendu Mahanta
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is also available in Hibernate reference http://docs.jboss.org/hibernate/core/3.5/reference/en/html/tutorial.html section 1.1.6. Startup and helpers.
Because reference is also written by same people: Christian Bauer & Gavin King.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic