简体   繁体   中英

I am getting this error SEVERE: Unable to process Jar entry [module-info.class] from Jar

When I add this log4j-api-2.10.0.jar

SEVERE: Unable to process Jar entry [module-info.class] from Jar log4j-api-2.10.0.jar./] for annotations org.apache.tomcat.util.bcel.classfile:ClassFormatException: Invalid byte tag in constant pool. 19...

I wanted to migrate from log4j to log4j2 and for that I added

  1. log4j-api-2.10.0.jar
  2. log4j-core-2.10.0.jar
  3. log4j-1.2-api.jar
  4. log4j2.properties

I tried to downgrade the JAR version but encode functionality is not working out.

But I am getting this error and not able to resolve it. I tried many methods but none of them worked out.

Please help me in order to resolve this issue

module-info.class is used by Java 9+ when using the Java Platform Module System. As such, it has to be compiled with the Java 9 compiler. Because that class will cause problems for applications running with Java 8 or less it has been placed in the META-INF/versions/9/ folder within the jar where it should be ignored by applications.

In short, you probably need to upgrade your Tomcat version. See the answer for SEVERE: Unable to process Jar entry [module-info.class] in Tomcat 7 && Java 8 for the specific versions that fix the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM