This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes hibernate.cfg.xml not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hibernate.cfg.xml not found" Watch "hibernate.cfg.xml not found" New topic
Author

hibernate.cfg.xml not found

Cherry Gupta
Greenhorn

Joined: Feb 09, 2010
Posts: 17
Hi,

I m new to hibernate.
I m trying to integrate hibernate with servlet using Tomcat but I m getting the exception org.hibernate.HibernateException: /hibernate.cfg.xml not found

Please tell me where to put "hibernate.cfg.xml" in my project. I m using eclipse.

Thanks
Cherry
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

By default you should deploy it to the top level of your classpath.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: hibernate.cfg.xml not found