module-info.class问题
haohaounique 人气:0module-info.class问题
1.module-info.class是个什么?干什么?
2.看名字module-info,即模块信息,自然想到是管理模块信息的。jdk9特性里的,在解压软件中直接干掉呗,试试没报错ok就行
3.pom文件导入 asm等配置后启动报错
<dependency> <groupId>asm</groupId> <artifactId>asm</artifactId> <version>3.3.1</version> </dependency>
严重:
Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/soft/repository/org/ow2/asm/asm/7.1/asm-7.1.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
log4j中也有,也干掉,这个层次jar位置再往下找META-INF/versions/9/module-info.class,编译器都告诉你位置了,别傻傻的和前面那个一样
Unable to process Jar entry [META-INF/versions/9/module-info.class] from Jar [jar:file:/D:/soft/repository/org/apache/logging/log4j/log4j-api/2.12.0/log4j-api-2.12.0.jar!/] for annotations
找到对应maven仓库的位置 /D:/soft/repository/org/apache/logging/log4j/log4j-api/2.12.0/log4j-api-2.12.0.jar!/下的
META-INF/versions/9/module-info.class 解压工具删除掉(关掉IDE工具,删完再运行)
Tomcat报错module-info.class
Tomcat报错[module-info.class] from Jar [file:/S:/Environment/apache-tomcat-8.5.11/wtpwebapps/huibang/WEB-INF/lib/jaxb-api-2.3.1.jar] for annotations:
十一月 11, 2020 10:48:50 上午 org.apache.catalina.startup.ContextConfig processAnnotationsJar
严重: Unable to process Jar entry [module-info.class] from Jar [file:/S:/Environment/apache-tomcat-8.5.11/wtpwebapps/huibang/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:54)
at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:174)
at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:83)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2053)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2000)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1970)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1923)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1163)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
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:5087)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)十一月 11, 2020 10:48:51 上午 org.apache.catalina.startup.ContextConfig processAnnotationsJar
严重: Unable to process Jar entry [module-info.class] from Jar [file:/S:/Environment/apache-tomcat-8.5.11/wtpwebapps/huibang/WEB-INF/lib/stax-ex-1.8.jar] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
以第一个报错为例
processAnnotationsJar
严重: Unable to process Jar entry [module-info.class] from Jar [file:/S:/Environment/apache-tomcat-8.5.11/wtpwebapps/huibang/WEB-INF/lib/jaxb-api-2.3.1.jar] for annotations
找到Maven下的jar包
查看jar包所在路径
找到并删除它
以上为个人经验,希望能给大家一个参考,也希望大家多多支持。
加载全部内容