本文介绍了java.util.zip.ZipException:打开zip文件时出错,tomcat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的项目正在运作,但我不知道发生了什么。
运行应用程序时遇到此问题:
My project is working, but I don't know what happend why.I'm having this problem when I run the application:
Avertissement: Failed to scan JAR [file:/C:/Users/TOSHIBA/Desktop/Nouveau%20dossier%20(3)/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/1-BaseAppMaven/WEB-INF/lib/scala-library-2.10.4.jar] from WEB-INF/lib
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.<init>(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(Unknown Source)
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.ContextConfig$FragmentJarScannerCallback.scan(ContextConfig.java:2615)
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.ContextConfig.processJarsForWebFragments(ContextConfig.java:1871)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1259)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
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:5355)
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)
如何解决此问题?
推荐答案
按照这个食谱:
- 检查文件是否存在
- 尝试用ZIP工具打开文件(7z,WinZip,...)
- 检查文件大小是否正确;将其与已知良好副本进行比较
- 将已知的好副本复制到文件的位置。如果错误消失,您的硬盘可能会死亡。
- 再次下载已知好副本以确保它仍然良好。
- Check that the file exists
- Try to open the file in ZIP tool (7z, WinZip, ...)
- Check that the file has the correct size; compare it to a "known good" copy
- Copy the known good copy into the place of the file. If the error goes away, your hard disk may be dying.
- Download the "known good" copy again to make sure it's still good.
这篇关于java.util.zip.ZipException:打开zip文件时出错,tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!