0

I am facing error on adding backend dependency in pom.xml in eclipse. The below error comes. On other machines this works fine. Server is Tomcat 9.0. Without the dependancy the code works fine. Running this displays that localhost refused to connect.

my dependency

<dependency>
            <groupId>com.anshuman</groupId>
            <artifactId>books4ubackend</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>

console

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@7fe8ea47]
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
    at cutorService.submit(AbstractExecutorService.java:134)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
    ... 21 more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
    at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:114)
    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
    ... 33 more
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
    at java.util.zip.ZipFile.read(Native Method)
    at java.util.zip.ZipFile.access$1400(ZipFile.java:61)
    at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:715)
    at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:420)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
    at sun.misc.IOUtils.readFully(IOUtils.java:65)
    at java.util.jar.JarFile.getBytes(JarFile.java:425)
    at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)
    at java.util.jar.JarFile.getManifest(JarFile.java:180)
    at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:112)

Sep 10, 2017 3:29:44 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-9090"]
Sep 10, 2017 3:29:44 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-nio-8009"]
  • Similiar question have been already asked. [Maven invalid LOC header (bad signature)](https://stackoverflow.com/a/41914842/2078494), [hibernate-commons-annotations-4.0.1.Final.jar; invalid LOC header (bad signature)?](https://stackoverflow.com/a/23701738/2078494) . Have you tried the suggested solutions? – Stasys Skliutas Sep 10 '17 at 10:26
  • These answers have a maven install build failure coming whereas i already did maven install and maven clean of my backend. It shows Success. So i dont think corrupted JARs are the problem. Thanks anyways. – Anshuman Raina Sep 10 '17 at 15:34
  • Have you tried deleting local maven repository? as suggested in the answer [Failed to start component - ZipException: invalid LOC header (bad signature)](https://stackoverflow.com/a/41499934/2078494) . Deleting local repo makes sense, as it forces to redownload artifacts from remote repository, otherwise you just reusing the corrupted artifacts if any from local repo. – Stasys Skliutas Sep 10 '17 at 15:51

0 Answers0