Getting NoClassDefFoundError after importing with Maven
Posted: Sat Sep 19, 2015 4:41 am
I'm trying to use docx4j in a Java project, in Eclipse, and miserably failing. I tried to get the jar, and all the dependencies, but couldn't correctly set it up.
So I decided to use Maven. I right clicked the project, and did Configure->Convert To Maven Project. I then added
to pom.xml, and did Maven->Update Project
It seemed to get the docx4j and all the dependency jars into the Maven Dependencies.
I get the exception java.lang.NoClassDefFoundError whenever I try instantiating a class that uses doc4j.
Am I missing something? How do I use this library in eclipse???
So I decided to use Maven. I right clicked the project, and did Configure->Convert To Maven Project. I then added
- Code: Select all
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j</artifactId>
<version>3.2.2</version>
</dependency>
to pom.xml, and did Maven->Update Project
It seemed to get the docx4j and all the dependency jars into the Maven Dependencies.
I get the exception java.lang.NoClassDefFoundError whenever I try instantiating a class that uses doc4j.
Am I missing something? How do I use this library in eclipse???