gpt4 book ai didi

java.lang.IllegalArgumentException : Invalid or unreadable WAR file : error in opening zip file 异常

转载 作者:太空狗 更新时间:2023-10-29 22:49:55 26 4
gpt4 key购买 nike


当我的 display.war 文件在 Tomcat 上执行时,我在 Catalina.2011-03-30.log 中收到此错误。错误如下所示:

Mar 30, 2011 8:01:31 PM org.apache.catalina.startup.ContextConfig init  
SEVERE: Exception fixing docBase for context [/Display]
java.util.zip.ZipException: error in opening zip file

at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:114)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:72)
at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:72)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:48)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:70)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:148)
at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:886)
at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:1021)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5602)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4378)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:662)

Mar 30, 2011 8:01:31 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources

java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in opening zip file
at org.apache.naming.resources.WARDirContext.setDocBase(WARDirContext.java:135)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4249)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4418)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:662)

提前致谢。

最佳答案

不幸的是,原因和解决方案并不明显as Buhake Sindi suggests .我之前在几个论坛中多次看到过这个问题。我什至自己至少经历过一次。谷歌目前在 exact 上给出了超过 500 次点击。异常消息。一切都没有答案。然而,有迹象表明它在 IDE X 中有效,但在 IDE Y 中无效,它在服务器 X 中有效,但在服务器 Y 中无效。或者从 WAR 中删除或添加某物 有效(可以找到一个典型的例子 here )。然而,没有人深入解释真正的根本原因。

认为这与使用的 JDK/JRE 版本和 WAR 文件大小的组合有关。您可以尝试以下操作:

  • 尝试在您的 IDE 和/或应用服务器环境中更新/调整 JDK/JRE 版本。
  • 尝试向 WAR 添加一些东西,一些随机的 JAR 或 JSP 文件或其他任何东西,然后重建。

关于java.lang.IllegalArgumentException : Invalid or unreadable WAR file : error in opening zip file 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5493931/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com