JSTL库错误

时间:2016-10-03 08:17:48

标签: java eclipse jar jstl

我收到了一些阻碍我的应用工作的错误。我做错了什么?

    SEVERE: Unable to process Jar entry [javax/servlet/jsp/jstl/core/ConditionalTagSupport.class] from Jar [jar:file:/K:/iACADEMY/3rd%20Year%201st%20Sem/Ent%20Java%202/apache-tomcat-7.0.57/lib/jstl-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:2134)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2010)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1976)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1961)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1319)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Oct 03, 2016 4:12:57 PM org.apache.catalina.startup.ContextConfig processAnnotationsJar
SEVERE: Unable to process Jar entry [javax/servlet/jsp/jstl/core/Config.class] from Jar [jar:file:/K:/iACADEMY/3rd%20Year%201st%20Sem/Ent%20Java%202/apache-tomcat-7.0.57/lib/jstl-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:2134)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2010)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1976)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1961)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1319)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Oct 03, 2016 4:12:59 PM org.apache.catalina.startup.ContextConfig processAnnotationsJar
SEVERE: Unable to process Jar entry [javax/servlet/jsp/jstl/core/ConditionalTagSupport.class] from Jar [jar:file:/K:/iACADEMY/3rd%20Year%201st%20Sem/Ent%20Java%202/apache-tomcat-7.0.57/lib/jstl-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:2134)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2010)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1976)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1961)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1319)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Oct 03, 2016 4:12:59 PM org.apache.catalina.startup.ContextConfig processAnnotationsJar
SEVERE: Unable to process Jar entry [javax/servlet/jsp/jstl/core/Config.class] from Jar [jar:file:/K:/iACADEMY/3rd%20Year%201st%20Sem/Ent%20Java%202/apache-tomcat-7.0.57/lib/jstl-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:2134)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2010)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1976)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1961)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1319)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

我想使用JSTL foreach函数,但不知何故,这个错误在处理后发生。这是我的控制台上显示的错误跟踪。

2 个答案:

答案 0 :(得分:0)

我认为你的问题是jar文件的路径。 罐子:文件:/ K:/iACADEMY/3rd%20Year%201st%20Sem/Ent%20Java%202/apache-tomcat-7.0.57/lib/jstl-1.2.jar! 我认为您可以使用非空格字符重命名路径,然后重试。

答案 1 :(得分:0)

它也可能是损坏的JAR,因此对于遇到此错误的任何人都可以解决这个问题:tomcat server fails to start the server and application in STS