java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal?
exception 提问于:2019-11-25
0 0
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal  
        at java.lang.ClassLoader.defineClass1(Native Method)  
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)  
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)  
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)  
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)  
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)  
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)  
        at java.security.AccessController.doPrivileged(Native Method)  
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)  
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)  
        at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)  
        at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)  
        at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)  
        at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
  • 所有回答
bluesky 回答于:2019-11-25
0 0

缺少jar
maven添加依赖

<dependency>
    <groupId>xml-apis</groupId>
    <artifactId>xml-apis</artifactId>
    <version>1.4.01</version>
</dependency>
我来回答    java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal?