• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate:xml file not found but find properties file

 
amit sharma
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just started to learn hibernate .I make hibernate.cfg.xml but when i execute my application it not find xml file but when i make hibernate.properties and put in the same directory it easily find it .Where i am going wrong.
Thanks
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you placed the hibernate.cfg.xml at the root of the classpath? For more details have a look at Section 3.7 at Hibernate Reference
 
amit sharma
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jaikiran Pai:
Have you placed the hibernate.cfg.xml at the root of the classpath? For more details have a look at Section 3.7 at Hibernate Reference


When hibernate not able to find xml file i put the properties file in same directory.
Thanks
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!