Wednesday, April 4, 2012

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


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:2176)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2157)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2137)
at util.SessionUtil.<clinit>(SessionUtil.java:10)

Reason: hibernate.cfg.xml is not found in the default location or the location specified to the configuration. Place the hibernate.cfg.xml file in root folder of the source code or specify the correct file path to configuration object.

No comments:

Post a Comment