Javatpoint Logo

Exception in Hibernate please help me out

By: surajg*** On: Fri Jun 16 17:08:18 IST 2017     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
This is the exception

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.hibernate.HibernateException: hibernate.cfg.xml not found
at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1402)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1424)
at com.hibernate.test.application.main(application.java:13)
Up0Down
hibernate  x  70Tags

 
Hi,

That error says java complier could not find your hibernate.cfg.xml file. Please check where you placed your hibernate.cfg.xml file. This configuration file should be placed under src not any other folder.

Otherwise, Provide the exact path of the file in Configuration.

Thanks.
Image Created0Down

By: [email protected] On: Mon Jul 10 18:08:24 IST 2017 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No
 
cwDDDDDDDDDDDDDDDDDDDImage Created0Down

By: [email protected] On: Mon Nov 27 08:50:15 IST 2017 Question Reputation0 Answer Reputation0 Belt Series Points0 0User Image
Are You Satisfied :0Yes0No