Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate.cfg.xml not found

 
Udit Manektala
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was trying out the Sample Hibernate Application
here
and it all worked fine until I ported the sample to Servlet form. I'm getting the following error when i try to initiate a data Save through Hibernate.
java.lang.ExceptionInInitializerError
util.HibernateUtil.<clinit>(Unknown Source)
events.EventManagerServlet.doGet(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

And in the Tomcat log it says
13:10:29,921 INFO Configuration:1403 - Configuration resource: /hibernate.cfg.xml
Excepotion thrown /hibernate.cfg.xml not found


which originates from


Now the Hibernate.cfg.xml is in the webapps\hibtest\WEB_INF\classes folder.
And I assume this in the runtime classpath of the application, then why does it still give this error?
 
Bougnon Kipre
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like a case issue.
As you know in java, object names are case-sensitive

Is the file name hibernate.cfg.xml or Hibernate.cfg.xml
[ September 13, 2007: Message edited by: Bougnon Kipre ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic