Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Hibernate Setup - Beginner Questions

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:


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:


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.

Posts: 10336
Hibernate Eclipse IDE 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.
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic