• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Setup - Beginner Questions

 
Anthony Andras
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I am attempting to get my first Hibernate program running and am having some issues. In an attempt to execute my program in Eclipse, I am receiving the following exception:

Exception



Clearly it is stating that I am missing the dialect property in my Hibernate configuration file, however my Hibernate config contains this property as displayed below:

hibernate.cfg.xml


I have left out the doctype declaration and the xml header information.

Now I have boiled this down to eclipse not picking up my hibernate.cfg.xml file (when I move the hibernate conf file around, I get the same error.)

My questions:

1) Where should the hibernate configuration file be placed?
2) How can I point my build path in eclipse to point at this file so that I can run this program directly in Eclipse?

Thank you everyone in advance for your input. I am sure this question has been asked before and I apologize if this is a duplicate post.

Best,
Anthony
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) if you are using the default configuration mechanism it needs to be on your classpath at the root of your application.
2) If your file is included in your eclipse project it is on the classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic