0

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

Gagravarr
  • 47,320
  • 10
  • 111
  • 156
Fridie3000
  • 40
  • 1
  • 6
  • Could you please check the contents of the jar and ensure the class exists? It's possible the type got moved to a different package or was removed. – lordoku Mar 28 '18 at 13:48
  • The class does exist but when I try open it i get the error 'invalid LOC header (bad signature)' – Fridie3000 Mar 28 '18 at 13:51
  • 1
    Sounds like the jar is corrupted. This question's second answer may help: https://stackoverflow.com/questions/32090921/deploying-maven-project-throws-java-util-zip-zipexception-invalid-loc-header-b – lordoku Mar 28 '18 at 13:57
  • That worked! Thank you :) – Fridie3000 Mar 28 '18 at 14:06
  • No problem, I'll go ahead and write an answer. Could you please up vote? – lordoku Mar 28 '18 at 14:10

1 Answers1

2

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.
lordoku
  • 908
  • 8
  • 22