热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Tomcat:在部署war包的时候java.util.zip.ZipException:errorinopeningzipfile

2019独角兽企业重金招聘Python工程师标准当我们在tomcat中部署war包的时候,发生了如下异常:18-Jan-201610:39:01.

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

当我们在tomcat中部署war包的时候,发生了如下异常:

18-Jan-2016 10:39:01.036 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1663 ms
18-Jan-2016 10:39:01.109 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
18-Jan-2016 10:39:01.109 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.30
18-Jan-2016 10:39:01.168 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/tomcat/webapps/UserInterface-1.0-SNAPSHOT.war
18-Jan-2016 10:39:02.235 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/UserInterface-1.0-SNAPSHOT]]at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1795)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)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)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@6da9455d]at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4928)at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5058)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)... 10 more
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@6e366f32]at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:699)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)... 13 more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: error in opening zip fileat org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:96)at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)... 16 more
Caused by: java.util.zip.ZipException: error in opening zip fileat java.util.zip.ZipFile.open(Native Method)at java.util.zip.ZipFile.(ZipFile.java:219)at java.util.zip.ZipFile.(ZipFile.java:149)at java.util.jar.JarFile.(JarFile.java:166)at java.util.jar.JarFile.(JarFile.java:103)at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:88)... 17 more

当然,我们的解决方法非常奇葩,删除maven的资源库中所有的jar包,然后重新通过maven编译项目,项目神奇地好用了。


转:https://my.oschina.net/hengbao666/blog/1550065



推荐阅读
author-avatar
爬树小羊_298
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有