javaeclipsemavenapache-poixmlbeans

java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject


I am getting the following error,

java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject

I'm using Maven and have included the poi and poi-ooxml dependencies. This installed the xmlBeans jar so i'm not sure why it isn't working.

These are the jars I currently have installed

Any help is appreciated


Solution

  • It sounds like the jar is corrupt. Try the second answer from the following question: Deploying Maven project throws java.util.zip.ZipException: invalid LOC header (bad signature)

    In other words:

    1. Try removing the contents of the local repository directory. On Windows this is located at: C:\Users[username].m2\repository folder.
    2. In Eclipse, right-click on the project and select Maven->Update Project. Ensure the Force Update of Snapshots/Releases is selected.