• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Folder Structure for a Hibernate Web Application

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.....



 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 129
Firefox Browser Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic