Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to deploy war to Tomcat

I get this error when deploying application war to the server:

12-Sep-2018 10:21:54.726 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.processAnnotationsJar Unable to process Jar entry [module-info.class] from Jar [file:/xxx/apache-tomcat-8.0.41_xxxx/webapps/xxx/WEB-INF/lib/jaxb-api-2.3.0.jar] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19

Informations:

  1. Application is a micro-service created with Spring Boot
  2. Java used is version 8
  3. Tomcat version: tomcat-8.0.41

Thank you.

like image 279
M-BNCH Avatar asked Sep 08 '25 13:09

M-BNCH


1 Answers

module-info.class is a module descriptor for Java’s module system that was introduced in Java 9. Some code in Tomcat 8.0 is unable to read the bytecode in that class file so deployment is failing.

I believe this is a limitation of Tomcat 8.0 that has been fixed in 8.5. Also note that an end-of-life announcement has been made for 8.0 so you should be planning to upgrade ASAP even without this problem.

like image 76
Andy Wilkinson Avatar answered Sep 10 '25 07:09

Andy Wilkinson