1

I am using UBUNTU 16.04 LTS to develope hibernate with java simple program, In that, I load the below mentioned dom4j-1.6.jar file from local directory not from root path, If I need to load the dom4j-1.6.jar file from root in which directory should have?

the below mentioned error raising after loading configuration file

Kindly provide solution to proceed further

Exception in thread "main" java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader
    at org.hibernate.util.XMLHelper.createSAXReader(XMLHelper.java:35)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1218)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1162)
    at com.hibernate.app.Pupil.main(Pupil.java:17)
Caused by: java.lang.ClassNotFoundException: org.dom4j.io.SAXReader
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 4 more

My Advance Thanks to ALL

Arunkumar
  • 11
  • 1
  • Possible duplicate of [Caused by: java.lang.ClassNotFoundException: org.dom4j.io.STAXEventReader](https://stackoverflow.com/questions/36222306/caused-by-java-lang-classnotfoundexception-org-dom4j-io-staxeventreader) – Barney Jul 20 '17 at 19:19

1 Answers1

1

Add dom4j.jar to your classpath. Downnload

Ori Marko
  • 56,308
  • 23
  • 131
  • 233