aspose file tools
The moose likes Object Relational Mapping and the fly likes Folder Structure for a Hibernate Web Application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Folder Structure for a Hibernate Web Application" Watch "Folder Structure for a Hibernate Web Application" New topic
Author

Folder Structure for a Hibernate Web Application

Nuwan Arambage
Ranch Hand

Joined: May 05, 2010
Posts: 76
Hi, all

I have tried to test the simple application (Like login) but I couldn't run the application.. Can somebody clearly specify
where is the location I need to place the "hibernate config" & "hibernate mapping " xml files.

& By the way I need to know what are the minimum jar files needed to run the hibernate application.....





Thinker
Nuwan Arambage
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12612
I almost always just put them at the root of the classpath.

The Hibernate docs list what libraries are required, and I believe the distribution includes them as well. Without even knowing what version of Hibernate you're using, though, it's difficult to help.
Victor Ramen
Ranch Hand

Joined: Jul 14, 2008
Posts: 56
Yes...root of classpath is a safe bet I think. So this means under 'src' so when you compile, they go under WEB-INF/classes.

Roy
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

XML configuration file of Hibernate, “hibernate.cfg.xml” should always be placed at the root of the classpath, outside of any package.
If you misplaced this configuration file into a other directory, you may get a error like this :
"Initial SessionFactory creation failed " ..
If you prefer Hibernate to locate for your “hibernate.cfg.xml” file in a sub-package of your classpath,
you need to do some modification to the Hibernate’s SessionFactory class by providing your “hibernate.cfg.xml” file path as an argument to
the configure() method:


VIJINDAS
 
 
subject: Folder Structure for a Hibernate Web Application
 
MyEclipse, The Clear Choice