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

 
wade wang
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on webapp using Hibernate 2.1.8 within Jboss 4.0.2. I call
Hibernate via a session bean. I pack hibernate.cfg.xml plus mapping files
in EJB-JAR mywebapp.jar. Somehow it's working fine on my windows-2000 desktop, however throwing me the following exception on my XP laptop:

Any helps would be greatly appreciated.

et.sf.hibernate.HibernateException: /hibernate.cfg.xml not found
at net.sf.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:886)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:910)
at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:897)
at com.wwsoft.j2eecomplete.ejb.HibernateUserSessionBean.createUserWithHibernate(HibernateUserSessionBean.java:161)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
 
Vinnie Jenks
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had this problem when I first started w/ Hibernate (3 days ago )

You have to make sure this file is in the classpath (i.e. put it in the /WEB-INF/lib directory, inside one of your class libraries, manually enter it in the classpath, etc.)

Good luck!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic