Errors&Solutions
Hi Everyone We hope you have seen our hibernate tutorials if not click the hibernate tab,Here i am going to give you
Some of the Common Errors in Hibernate
Which occurred during the compiling and running of hibernate.
java.lang.NoClassDefFoundError: javax/transaction/Synchronization at org.hibernate.impl.SessionFactoryImpl.buildCurrentSessionContext(Sess
ionFactoryImpl.java:1036)
Click to view the solution
Exception in thread “main” java.lang.ExceptionInInitializerError
atTestClient.createHoney(TestClient.java:82)atTestClient.main(TestClient.java:25)Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:170)
Click to view the solution
Exception in thread “main” java.lang.ExceptionInInitializerError
at quickstart.HibernateUtil.
at h.main(h.java:16)Caused by: org.hibernate.HibernateException: Could not find datasource at org.hibernate.connection.DatasourceConnectionProvider.configure(Datas
ourceConnectionProvider.java:79)
Click to view the solution
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment For this error you need to adjust the class path for compiling that is “jta.jar” is missing put jta.jar in lib folder to solve this problem
).log4j:WARN Please initialize the log4j system properly.
Click to view the Solution
JTA(Java Transaction)
Back to Top For this error you need to check whether your put hibernate.cfg.xml is in root directory or check cfg file for any misspelling or missing statements
Hibernate.cf.xml
Back to Top
This is actually not an error it shows because it has started log4j.properties file nothing worry about this warning
log4j.prperties
If your error is not addresses here Contact us CLICK HERE




