java.util.zip.ZipException: invalid LOC header (bad signature)

java.util.zip.ZipException: invalid LOC header (bad signature)

1:部署好项目,启动tomcat出现如下所示的错误,百度方法,挺多的,但是好像并没有解决我的问题,问题如下所示:

复制代码
 1 java.util.zip.ZipException: invalid LOC header (bad signature)
 2     at java.util.zip.ZipFile.read(Native Method)
 3     at java.util.zip.ZipFile.access$1400(Unknown Source)
 4     at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source)
 5     at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Unknown Source)
 6     at java.util.zip.InflaterInputStream.read(Unknown Source)
 7     at org.apache.catalina.loader.WebappClassLoaderBase.findResourceInternal(WebappClassLoaderBase.java:3521)
 8     at org.apache.catalina.loader.WebappClassLoaderBase.findResource(WebappClassLoaderBase.java:1458)
 9     at org.apache.catalina.loader.WebappClassLoaderBase.getResourceAsStream(WebappClassLoaderBase.java:1686)
10     at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2272)
11     at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2262)
12     at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2280)
13     at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2262)
14     at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2280)
15     at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2262)
16     at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2280)
17     at org.apache.catalina.startup.ContextConfig.populateJavaClassCache(ContextConfig.java:2262)
18     at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2168)
19     at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2120)
20     at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1981)
21     at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1942)
22     at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1927)
23     at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1332)
24     at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:888)
25     at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
26     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
27     at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
28     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5522)
29     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
30     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
31     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
32     at java.util.concurrent.FutureTask.run(Unknown Source)
33     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
34     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
35     at java.lang.Thread.run(Unknown Source)
36 
37 二月 18, 2018 5:26:40 下午 org.apache.catalina.loader.WebappClassLoaderBase findResourceInternal
38 严重: Resource read error: Could not load junit/framework/TestCase.class.
复制代码

2:解决方法如下所示,以及问题分析:

原因如下所示,出现如下所示,是因为下载没有下载完整。所以删除了这个包,从新使用maven下载即可:

 

使用如下所示maven工具进行下载即可:

 然后使用toncat启动项目即可;主要分析是那个包出现来下载异常,然后解决即可;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值