1

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)

What can I do to solve this issue?

Reporter
  • 3,897
  • 5
  • 33
  • 47
user3664298
  • 21
  • 1
  • 2
  • 6

1 Answers1

7

Follow this recipe:

  1. Check that the file exists
  2. Try to open the file in ZIP tool (7z, WinZip, ...)
  3. Check that the file has the correct size; compare it to a "known good" copy
  4. Copy the known good copy into the place of the file. If the error goes away, your hard disk may be dying.
  5. Download the "known good" copy again to make sure it's still good.
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • the problem that i don't have a zip file , it's just a simple jar , "scala-library-2.10.4.jar " , and when i import an old version of the application it's working and it have the same jar (pom.xml ), – user3664298 Jul 17 '14 at 10:52
  • JAR files are also ZIP files (JAR just says it has to have a couple of mandatory files inside). This means you can open any JAR file with any ZIP tool. – Aaron Digulla Jul 17 '14 at 15:29
  • thks for your hepl :) – user3664298 Jul 17 '14 at 17:45
  • 1
    I have a good copy, but I am still running into this error...what to do? – Raghu Kanchiraju Apr 02 '15 at 10:12
  • 1
    @RaghuKanchiraju: Then maybe something is wrong with your path or you have an anti-virus which prevents Java from opening the file or the permissions are wrong. Also, don't put JARs on net shares, it can cause weird problems. – Aaron Digulla Apr 06 '15 at 18:17