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

Jenkins JIRA | Scott Hathaway | 2 years ago
  1. 0

    While working on changes to the m2release plugin, I found that the .hli file being produced by the maven-hpi-plugin contained paths to .pom files in the Libraries section. This only became an issue when I moved the m2release plugin to the 1.532 version of Jenkins core as the updated ClassPluginStrategy class used the AntClassLoader and no longer the URLClassloader to load dependencies. Attempting to start Jenkins using mvn hpi:run resulted in a java.util.zip.ZipException. I fixed the issue and submitted a pull request to the maven-hpi-plugin project: https://github.com/jenkinsci/maven-hpi-plugin/pull/10 Repro: 1. Update the m2release plugin pom.xml parent to version 1.532. 2. Set the maven-plugin dependency to version 2.0. 3. Execute a >mvn clean hpi:run Result: 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:117) at org.apache.tools.ant.AntClassLoader.addPathFile(AntClassLoader.java:492) at hudson.ClassicPluginStrategy$AntClassLoader2.addPathFiles(ClassicPluginStrategy.java:665) at hudson.ClassicPluginStrategy.createClassLoader(ClassicPluginStrategy.java:227) at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:202) at hudson.PluginManager$1$3$1.run(PluginManager.java:238) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:899) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) 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)

    Jenkins JIRA | 2 years ago | Scott Hathaway
    java.util.zip.ZipException: error in opening zip file
  2. 0

    While working on changes to the m2release plugin, I found that the .hli file being produced by the maven-hpi-plugin contained paths to .pom files in the Libraries section. This only became an issue when I moved the m2release plugin to the 1.532 version of Jenkins core as the updated ClassPluginStrategy class used the AntClassLoader and no longer the URLClassloader to load dependencies. Attempting to start Jenkins using mvn hpi:run resulted in a java.util.zip.ZipException. I fixed the issue and submitted a pull request to the maven-hpi-plugin project: https://github.com/jenkinsci/maven-hpi-plugin/pull/10 Repro: 1. Update the m2release plugin pom.xml parent to version 1.532. 2. Set the maven-plugin dependency to version 2.0. 3. Execute a >mvn clean hpi:run Result: 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:117) at org.apache.tools.ant.AntClassLoader.addPathFile(AntClassLoader.java:492) at hudson.ClassicPluginStrategy$AntClassLoader2.addPathFiles(ClassicPluginStrategy.java:665) at hudson.ClassicPluginStrategy.createClassLoader(ClassicPluginStrategy.java:227) at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:202) at hudson.PluginManager$1$3$1.run(PluginManager.java:238) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:899) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) 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)

    Jenkins JIRA | 2 years ago | Scott Hathaway
    java.util.zip.ZipException: error in opening zip file
  3. 0

    Exclude OSX .DS_Store files by default

    GitHub | 3 years ago | robertoschwald
    java.util.zip.ZipException: error in opening zip file
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  1. cesarnog 291 times, last 1 month ago
21 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.util.zip.ZipException

    error in opening zip file

    at java.util.zip.ZipFile.open()
  2. Java RT
    JarFile.<init>
    1. java.util.zip.ZipFile.open(Native Method)
    2. java.util.zip.ZipFile.<init>(ZipFile.java:215)
    3. java.util.zip.ZipFile.<init>(ZipFile.java:145)
    4. java.util.jar.JarFile.<init>(JarFile.java:153)
    5. java.util.jar.JarFile.<init>(JarFile.java:117)
    5 frames
  3. Ant
    AntClassLoader.addPathFile
    1. org.apache.tools.ant.AntClassLoader.addPathFile(AntClassLoader.java:492)
    1 frame
  4. Hudson
    PluginManager$1$3$1.run
    1. hudson.ClassicPluginStrategy$AntClassLoader2.addPathFiles(ClassicPluginStrategy.java:665)
    2. hudson.ClassicPluginStrategy.createClassLoader(ClassicPluginStrategy.java:227)
    3. hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:202)
    4. hudson.PluginManager$1$3$1.run(PluginManager.java:238)
    4 frames
  5. init
    Reactor.runTask
    1. org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
    2. org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
    2 frames
  6. jenkins.model
    Jenkins$7.runTask
    1. jenkins.model.Jenkins$7.runTask(Jenkins.java:899)
    1 frame
  7. init
    Reactor$Node.run
    1. org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
    2. org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
    2 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    3. java.lang.Thread.run(Thread.java:744)
    3 frames