java.util.zip.ZipException:打开zip文件时出错,tomcat

时间:2014-07-17 09:19:52

标签: eclipse maven java-ee maven-3

我的项目正在运作,但我不知道发生了什么。 #39;我在运行应用程序时出现此问题:

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)

我该怎么做才能解决这个问题?

1 个答案:

答案 0 :(得分:6)

按照这个食谱:

  1. 检查文件是否存在
  2. 尝试以ZIP工具(7z,WinZip,...)
  3. 打开文件
  4. 检查文件的大小是否正确;将它与“已知良好”副本进行比较
  5. 将已知的好副本复制到文件的位置。如果错误消失,您的硬盘可能会死亡。
  6. 再次下载“已知好”副本以确保它仍然良好。