In this video you will learn why this error comes in the Hibernate project and how to solve the error? While working on a Hibernate/Java based after update of some of the jar file of the old version of Hibernate to new version of Hibernate this error occurred.
This is the runtime error and Hibernate application was not starting, so I searched and found that the error was due to unavailability of the dom4j jar file.
I checked the Hibernate download by extracting the zip file and found the dom4j-1.6.1.jar. After adding this jar file into the project error was resolved.
My project is actually based on the xml configuration file and Hibernate requires this jar file for parsing the xml file.
Following error was coming before adding the dom4j-1.6.1.jar file into project:
Failed to create sessionFactory object.java.lang.NoClassDefFoundError:
Exception in thread "main" java.lang.NullPointerException
Here is the video tutorial which explains you how to solve the error:
In this video you will see the steps to resolve the error by adding the dom4j-1.6.1.jar file into the project and then run the Hibernate application.
Check more tutorials at:
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: August 16, 2015 If you enjoyed this post then why not add us on Google+? Add us to your Circles