启动TOMCAT报错 java.util.zip.ZipException: invalid LOC header (bad signature)

时间:2021-08-26 07:33:38

报错信息大致如下所示:

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) 七月 23, 2013 4:14:07 下午 org.apache.catalina.startup.ContextConfig processAnnotationsJar
SEVERE: Unable to process Jar entry [org/apache/taglibs/standard/lang/jstl/LessThanOrEqualsOperator.class] from Jar [jar:jndi:/localhost/app/WEB-INF/lib/standard-1.1.2.jar!/] for annotations
java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(Unknown Source)
at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Unknown Source)
at java.util.zip.InflaterInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.DataInputStream.readInt(Unknown Source)
at org.apache.tomcat.util.bcel.classfile.ClassParser.readID(ClassParser.java:237)
at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:114)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1917)

原因:

[jar:jndi:/localhost/app/WEB-INF/lib/standard-1.1.2.jar!
原因是这个jar包由于位置原因被破坏了

解决方案:

重新拷贝一个新jar包,或者让maven重新下。