java lang NoClassDefFoundError org dom4j io SAXReader

java lang NoClassDefFoundError org dom4j io SAXReader

This is very common exception while working with application where document needs to parse. If you are getting exception shown below:

java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader

Caused by: java.lang.ClassNotFoundException: org.dom4j.io.SAXReader

Solution: As you see in the exception is says clearly its not finding class name SAXReader so to fix this exception please include dom4j.jar:

  • For maven please include below dependency:

  • For other project download and include dom4j-1.6.1.jar or its latest version.

Reference:

Leave a Reply

Your email address will not be published. Required fields are marked *