How to resolve java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal?

Remove the existing Apache POI dependency and add the below mentioned dependencies in  POM.xml:

     <dependency>
                <groupId>xml-apis</groupId>
                <artifactId>xml-apis</artifactId>
                <version>1.4.01</version>
            </dependency>

            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml</artifactId>
                <version>3.9</version>
                <exclusions>
                    <exclusion>
                        <artifactId>xml-apis</artifactId>
                        <groupId>xml-apis</groupId>
                    </exclusion>       
                </exclusions>
            </dependency>       
How to resolve java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal? How to resolve java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal? Reviewed by Unknown on August 20, 2018 Rating: 5

No comments:

Thanks a lot for your valuable Comment!

Powered by Blogger.