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

Global tool JDK 11.0.12 causes "java.util.zip.ZipException: archive is not a ZIP archive" at pipeline download/unzip

XMLWordPrintable

      The exception below is thrown when defining a global tool JDK 11.0.12 with

      URL: https://download.oracle.com/otn/java/jdk/11.0.12%2B8/f411702ca7704a54a79ead0c2e0942a3/jdk-11.0.12_windows-x64_bin.zip

      and with:

          bat 'java --version'
      
      java 16.0.2 2021-07-20
      Java(TM) SE Runtime Environment (build 16.0.2+7-67)
      Java HotSpot(TM) 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)
      

      and also with:

      java 11.0.12 2021-07-20 LTS
      Java(TM) SE Runtime Environment 18.9 (build 11.0.12+8-LTS-237)
      Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.12+8-LTS-237, mixed mode)
      

       and a pipeline script with:

          tools {
              jdk 'JDK 11.0.12'
          }
      
      [Pipeline] { (Declarative: Tool Install)
      [Pipeline] tool
      Unpacking https://download.oracle.com/otn/java/jdk/11.0.12%2B8/f411702ca7704a54a79ead0c2e0942a3/jdk-11.0.12_windows-x64_bin.zip to C:\Users\jenkins\AppData\Local\Jenkins\.jenkins\tools\hudson.model.JDK\JDK_11.0.12 on Jenkins
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      java.util.zip.ZipException: archive is not a ZIP archive
      	at org.apache.tools.zip.ZipFile.positionAtEndOfCentralDirectoryRecord(ZipFile.java:780)
      	at org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:716)
      	at org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:461)
      	at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:217)
      	at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:192)
      	at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:152)
      	at hudson.FilePath.unzip(FilePath.java:692)
      	at hudson.FilePath.unzip(FilePath.java:683)
      	at hudson.FilePath.access$200(FilePath.java:215)
      	at hudson.FilePath$UnzipFrom.invoke(FilePath.java:672)
      	at hudson.FilePath$UnzipFrom.invoke(FilePath.java:665)
      	at hudson.FilePath.act(FilePath.java:1165)
      	at hudson.FilePath.act(FilePath.java:1148)
      	at hudson.FilePath.unzipFrom(FilePath.java:663)
      	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:1017)
      Caused: java.io.IOException: Failed to unpack https://download.oracle.com/otn/java/jdk/11.0.12%2B8/f411702ca7704a54a79ead0c2e0942a3/jdk-11.0.12_windows-x64_bin.zip (4185 bytes read of total 4194)
      	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:1021)
      Caused: java.io.IOException: Failed to install https://download.oracle.com/otn/java/jdk/11.0.12%2B8/f411702ca7704a54a79ead0c2e0942a3/jdk-11.0.12_windows-x64_bin.zip to C:\Users\jenkins\AppData\Local\Jenkins\.jenkins\tools\hudson.model.JDK\JDK_11.0.12
      	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:1027)
      	at hudson.FilePath.installIfNecessaryFrom(FilePath.java:940)
      	at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:83)
      	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:69)
      	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
      	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:217)
      	at hudson.model.JDK.forNode(JDK.java:148)
      	at hudson.model.JDK.forNode(JDK.java:60)
      	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:155)
      	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:136)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Finished: FAILURE
      

            Unassigned Unassigned
            geri Gerold Broser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: