Home  >  Forum  >  Hibernate
Post New Query

org.hibernate.HibernateException: /hibernate.cfg.xml not found


joined on
April 23,2013
Asked on May 11,2013
Hi All,
 I am new to hibernate and stuck with error, Please help me.

Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found
    at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:170)
    at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1497)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1519)
    at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1194)
    at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:107)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1506)
    at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1188)


joined on
May 11,2013
Replied on May 11,2013

Ria, you need to put hibernate.cfg.xml file into the classpath. hibernate.cfg.xml is the file which contains database configuration and mapping of all pojo.
joined on
April 23,2013
Replied on May 11,2013

Thanks  Bob,

It works

Write Answer



Sitewide-Feb4of4234x60





Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us