1

I have an issue with tomcat when i want to deploy my project. The build step works fine, but during deployment it give me the following error :

    Caused by: java.lang.NoClassDefFoundError: org/apache/poi/openxml4j/exceptions/InvalidFormatException
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:262)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:136)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:66)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:328)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Caused by: java.lang.ClassNotFoundException: org.apache.poi.openxml4j.exceptions.InvalidFormatException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
... 19 more

I imported all the libraries needed by apachepoi. Here is my libraries in buildpath :

  • commons-csv-1.5.jar
  • commons-fileupload-1.3.3.jar
  • commons-io-2.6.jar
  • easymock-3.4.jar
  • gson-2.2.2.jar
  • HikariCP-2.6.1.jar
  • jBCrypt-0.4.jar
  • jstl-1.2.jar
  • log4j-1.2.17.jar
  • mysql-connector-java-5.1.41-bin.jar
  • objenesis-2.2.jar
  • selenium-server-standalone-3.3.1.jar
  • commons-codec-1.10.jar
  • commons-collections4-4.1.jar
  • commons-logging-1.2.jar
  • poi-3.17.jar
  • poi-ooxml-3.17.jar
  • poi-ooxml-schemas-3.17.jar
  • slf4j-api-1.7.22.jar
  • curvesapi-1.04.jar
  • xmlbeans-2.6.0.jar

Hope you can help me

3
  • 3
    This error typically occurs when you have a library version mismatch. Commented May 10, 2018 at 18:25
  • 1
    Build Path != Deployment / Runtime Path. What jars do you have at runtime? Which ones did you miss? What happens when you add them? Commented May 10, 2018 at 21:49
  • My librairies were not in the project.xml file, so tomcat coule not load them, even if the project was compiled... Tanks for help Commented May 11, 2018 at 10:35

1 Answer 1

1

My librairies were not in the project.xml file, so tomcat coule not load them, even if the project was compiled... Tanks for help

Sign up to request clarification or add additional context in comments.

3 Comments

You can mark your own answer as the correct one ;-)
Yeah, i had to wait a entire day before ^^
Glad you got it sorted!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.