Tomcat reports serious errors: unable to process jar entry [module info. Class] from jar

Keywords: Java Apache Tomcat log4j

Unable to process jar entry [module info. Class] from jar appears when Tomcat runs

It can be seen from error analysis that Jar entry cannot be processed from Jar package [module info. Class]
Wrong content

serious: Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/STS/Workspaces/Cloudview/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/task-starter/WEB-INF/lib/jaxb-api-2.3.1.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
	at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:97)
	at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:55)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:176)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:85)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2011)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1961)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1936)
	at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1897)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1149)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:771)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:305)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
 
//May 10, 2019 9:25:46 am org.apache.catalina.startup.contextconfig processannotations jar
//Serious: unable to process jar entry [meta-inf / versions / 9 / module info. Class] from jar [jar: File: / D: / STS / workspaces / Cloudview /. Metadata /. Plugins / org. Eclipse. WST. Server. Core / tmp0 / wtpwebapps / task starter / WEB-INF / lib / byte-buddy-1.9.12. Jar! /] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
	at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:97)
	at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:55)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:176)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:85)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2011)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1961)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1936)
	at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1897)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1149)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:771)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:305)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Solution 1
Find the path of apache-maven-3.6.1\repository\org\apache\logging\log4j\log4j-api .10.0 under Tomcat and open it. You can find log4j-2.10.0.jar
Open in compression mode instead of decompressing and deleting module info.class
Solution 2
Reason: at the end of Tomcat version, the corresponding Tomcat version of Spring boot 2.2.1 should be: update Tomcat version above 8.5.16 to 8.6 (available for pro test) with download address
Tomcat8 download address
Tomcat9 download address

Published 15 original articles, won praise 3, visited 451
Private letter follow

Posted by Mikersson on Thu, 30 Jan 2020 07:49:25 -0800