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
posted
0
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
posted
0
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.
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