Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55475

AntClassLoader doesn't report corrupted files

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • jenkins-test-harness
    • None
    • Windows, Eclipse Photon

      I try to update my plugin from old org.jenkins-ci.plugins:plugin:1.509.2 API to newer org.jenkins-ci.plugins:plugin:3.4.

      I get an error during test when calling "mvn install" in org.jvnet.hudson.test.PluginAutomaticTestBuilder$OtherTests.testPluginActive.

      It seems there is something like a corrupt JAR file, but I don't know which. Starting Maven with debug doesn't stop at breakpoints and AntClassLoader doens't report which JAR file can't be opened. How can I find the corrupt file without debugging? I would like AntClassLoader to report the zip file name.

       

      INFO] -------------------------------------------------------
      [INFO] T E S T S
      [INFO] -------------------------------------------------------
      [INFO] Running InjectedTest
      [ERROR] Tests run: 12, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 13.895 s <<< FAILURE! - in InjectedTest
      [ERROR] testPluginActive(org.jvnet.hudson.test.PluginAutomaticTestBuilder$OtherTests) Time elapsed: 0.007 s <<< ERROR!
      java.lang.Error: Plugin the.jpl failed to start
      at org.jvnet.hudson.test.PluginAutomaticTestBuilder$OtherTests.testPluginActive(PluginAutomaticTestBuilder.java:99)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)

      ...

      Caused by: 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:225)
      at java.util.zip.ZipFile.<init>(ZipFile.java:155)
      at java.util.jar.JarFile.<init>(JarFile.java:166)
      at java.util.jar.JarFile.<init>(JarFile.java:130)
      at jenkins.util.AntClassLoader.addPathFile(AntClassLoader.java:503)
      at jenkins.util.AntWithFindResourceClassLoader.addPathFiles(AntWithFindResourceClassLoader.java:35)

      ...

       

            olivergondza Oliver Gondža
            marco_jacob Marco Jacob
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: