[java ] java.util.zip.ZipException: error in opening zip file

严重: Failed to processes JAR found at URL [jar:file:/D:/tools/apache-tomcat-7.0.64_2/webapps/bbs/WEB-INF/lib/org.restlet.ext.servlet-2.3.0.jar!/] for static resources to be included in context with name [jar:file:/D:/tools/apache-tomcat-7.0.64_2/webapps/bbs/WEB-INF/lib/org.restlet.ext.servlet-2.3.0.jar!/]
十二月 24, 2015 8:21:01 下午 org.apache.catalina.startup.ContextConfig processResourceJARs
严重: Failed to processes JAR found at URL [jar:file:/D:/tools/apache-tomcat-7.0.64_2/webapps/bbs/WEB-INF/lib/org.restlet-2.3.0.jar!/] for static resources to be included in context with name [jar:file:/D:/tools/apache-tomcat-7.0.64_2/webapps/bbs/WEB-INF/lib/org.restlet-2.3.0.jar!/]
十二月 24, 2015 8:21:02 下午 org.apache.catalina.startup.TldConfig tldScanJar
警告: Failed to process JAR [jar:file:/D:/tools/apache-tomcat-7.0.64_2/webapps/bbs/WEB-INF/lib/org.restlet-2.3.0.jar!/] for TLD files
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:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:153)
at java.util.jar.JarFile.<init>(JarFile.java:90)
at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:109)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)
at org.apache.tomcat.util.scan.FileUrlJar.<init>(FileUrlJar.java:41)
at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34)
at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:502)
at org.apache.catalina.startup.TldConfig.access$200(TldConfig.java:61)
at org.apache.catalina.startup.TldConfig$TldJarScannerCallback.scan(TldConfig.java:300)
at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:258)
at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:177)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:271)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:590)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5405)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1948)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
十二月 24, 2015 8:21:02 下午 org.apache.catalina.startup.TldConfig tldScanJar

解决方法:

删除问题包org.restlet-2.3.0.jar所在的目录D:\Program Files\repository\maven\org\restlet\jee\org.restlet\2.3.0,然后重新build即可。
同类问题都可以使用此方法解决。

参考:

http://www.linuxso.com/linuxxitongguanli/2287.html

java.util.zip.ZipException: error in opening zip file

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


下一篇:python学习记录 - python3.x中如何实现print不换行