java.lang.NoClassDefFoundError: org/dom4j/Document

前端 未结 2 2089
猫巷女王i
猫巷女王i 2020-12-20 22:01

I have a class called XMLtoXML.java and this is one of it\'s methods...

import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4         


        
相关标签:
2条回答
  • 2020-12-20 22:23

    Looks like dom4j-full.jar contains both dom4j and jaxen. From you stacktrace I understand dom4j is in the classpath, and it can find jaxen, but when jaxen looks for dom4j it can't find it. I think the jaxen that has been loaded from dom4j isn't for some reason that one inside the dom4j-full.jar but another one that you have within your application server classpath (and not in your eclipse of course), perhaps loaded from a different classloader. Maybe you have a jaxen.jar in your shared libraries or something like this.

    0 讨论(0)
  • 2020-12-20 22:28

    The stacktrace clearly states that other org.dom4j classes are present and being used. So it seems you have library version conflict.

    dom4j and jaxen versions should be compatible with each other.

    Compare their versions with those that work well in standalone mode.

    0 讨论(0)
提交回复
热议问题