• 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

Hibernate with Tomcat

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,


I am using hibernate with Tomcat. All the hibernate files are defined in a 'config' folder on the WEB-INF,src,.. level. I am not able to build the session factory even if i give the entire path while configuring.


Please help

Regards,
Saumya
 
Ranch Hand
Posts: 502
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the error you are getting while building session factory and the source code.
 
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the config file (hibernate.cfg.xml) needs to be on the classpath.
The "src" tree is (usualy) not deployed to the server.

And yes, give the full stacktrace and may be a bit more detailed description of your file system layout!


pascal
 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Are you using Any Java IDE. or are you creating manual project creation? Please check all the files and folders available. Please mention the exact problem you are facing. Then only we can help you.
 
Saumya Nair
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
File not found error... does not get the location of hibernate.cfg.cml file
 
Saumya Nair
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Temporarily have placed the files in the classes dir of WEB_INF.. but would like to know how to obtain the hbm files that have been placed in a separate folder.. which does not lie in the output folder directory
 
Edward Durai
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My sample application working fine.
My folder struture looks like

src(folder)
-com (folder)
-all the hbm files and getter setter files
-Userlogin.hbm.xml
-Userlogin.java (contains setter and getter method)
-Auditfinding.hbm.xml
-Auditfinding.java (contains setter and getter method)
hibernate-cfg.xml

In hibernate-cfg.xml you should mention the correct path of hbm file

like



Hope it is useful for you. Thanks

Thanks
[ February 22, 2007: Message edited by: Edward Durai ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic