when I'm run my program it show this error
Code:
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/dom4j/DocumentException
Exception in thread "main" java.lang.ExceptionInInitializerError
at util.HibernateUtil.<clinit>(HibernateUtil.java:30)
at hibernate.Main.listEvents(Main.java:47)
at hibernate.Main.main(Main.java:33)
Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException
at util.HibernateUtil.<clinit>(HibernateUtil.java:26)
... 2 more
Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 3 more
And I want to know how to integrate Hibernate with Java Desktop application. Actually I want to access database using hibernate( with out writing SQL queries).