Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8170276

java.util.zip.ZipException: zip END header not found occurs within webstart application

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_7
    • Verification:
      Verified

      Description

      FULL PRODUCT VERSION :
      java version "9-ea"
      Java(TM) SE Runtime Environment (build 9-ea+142)
      Java HotSpot(TM) 64-Bit Server VM (build 9-ea+142, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      The program as shown by the source code below started by webstart causes the exception as shown in the error message below.




      REGRESSION. Last worked in version 8u111

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.8.0_111"
      Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a webstart application from the program below and start it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The output in the java console should be:
      simplewebstart.ServiceImpl
      ACTUAL -
      Exception below occurs.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.util.zip.ZipException: zip END header not found
      at java.util.zip.ZipFile$Source.zerror(java.base@9-ea/ZipFile.java:1233)
      at java.util.zip.ZipFile$Source.findEND(java.base@9-ea/ZipFile.java:1134)
      at java.util.zip.ZipFile$Source.initCEN(java.base@9-ea/ZipFile.java:1141)
      at java.util.zip.ZipFile$Source.<init>(java.base@9-ea/ZipFile.java:978)
      at java.util.zip.ZipFile$Source.get(java.base@9-ea/ZipFile.java:941)
      at java.util.zip.ZipFile.<init>(java.base@9-ea/ZipFile.java:215)
      at java.util.zip.ZipFile.<init>(java.base@9-ea/ZipFile.java:147)
      at java.util.jar.JarFile.<init>(java.base@9-ea/JarFile.java:320)
      at sun.net.www.protocol.jar.URLJarFile.&lt;init&gt;(java.base@9-ea/URLJarFile.java:97)
      at sun.net.www.protocol.jar.URLJarFile.&lt;init&gt;(java.base@9-ea/URLJarFile.java:46)
      at sun.net.www.protocol.jar.URLJarFile$1.run(java.base@9-ea/URLJarFile.java:219)
      at sun.net.www.protocol.jar.URLJarFile$1.run(java.base@9-ea/URLJarFile.java:214)
      at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
      at sun.net.www.protocol.jar.URLJarFile.retrieve(java.base@9-ea/URLJarFile.java:213)
      at sun.net.www.protocol.jar.URLJarFile.getJarFile(java.base@9-ea/URLJarFile.java:74)
      at sun.net.www.protocol.jar.JarFileFactory.get(java.base@9-ea/JarFileFactory.java:109)
      at sun.net.www.protocol.jar.JarURLConnection.connect(java.base@9-ea/JarURLConnection.java:122)
      at com.sun.deploy.net.protocol.jar.DeployURLConnection.connect(jdk.deploy@9-ea/DeployURLConnection.java:293)
      at com.sun.deploy.net.protocol.jar.DeployURLConnection.getInputStream(jdk.deploy@9-ea/DeployURLConnection.java:171)
      at java.util.ServiceLoader.parse(java.base@9-ea/ServiceLoader.java:453)
      at java.util.ServiceLoader.access$1200(java.base@9-ea/ServiceLoader.java:218)
      at java.util.ServiceLoader$LazyClassPathIterator.hasNextService(java.base@9-ea/ServiceLoader.java:789)
      at java.util.ServiceLoader$RestrictedIterator$1.run(java.base@9-ea/ServiceLoader.java:530)
      at java.util.ServiceLoader$RestrictedIterator$1.run(java.base@9-ea/ServiceLoader.java:529)
      at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
      at java.util.ServiceLoader$RestrictedIterator.hasNext(java.base@9-ea/ServiceLoader.java:532)
      at java.util.ServiceLoader$2.hasNext(java.base@9-ea/ServiceLoader.java:907)
      at java.lang.Iterable.forEach(java.base@9-ea/Iterable.java:74)
      at simplewebstart.Main.main(Main.java:12)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:537)
      at com.sun.javaws.Launcher.executeApplication(jdk.javaws@9-ea/Launcher.java:1737)
      at com.sun.javaws.Launcher.executeMainClass(jdk.javaws@9-ea/Launcher.java:1673)
      at com.sun.javaws.Launcher.doLaunchApp(jdk.javaws@9-ea/Launcher.java:1521)
      at com.sun.javaws.Launcher.run(jdk.javaws@9-ea/Launcher.java:157)
      at java.lang.Thread.run(java.base@9-ea/Thread.java:844)
      Suppressed: java.nio.file.NoSuchFileException: C:\Users\xxxx\AppData\Local\Temp\jar_cache6704635612339044772.tmp
      at sun.nio.fs.WindowsException.translateToIOException(java.base@9-ea/WindowsException.java:85)
      at sun.nio.fs.WindowsException.rethrowAsIOException(java.base@9-ea/WindowsException.java:103)
      at sun.nio.fs.WindowsException.rethrowAsIOException(java.base@9-ea/WindowsException.java:108)
      at sun.nio.fs.WindowsFileSystemProvider.implDelete(java.base@9-ea/WindowsFileSystemProvider.java:270)
      at sun.nio.fs.AbstractFileSystemProvider.delete(java.base@9-ea/AbstractFileSystemProvider.java:105)
      at java.nio.file.Files.delete(java.base@9-ea/Files.java:1129)
      at sun.net.www.protocol.jar.URLJarFile$1.run(java.base@9-ea/URLJarFile.java:224)
      ... 27 more


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Main.java:

      package simplewebstart;

      import java.net.URL;
      import java.util.ServiceLoader;

      public class Main {
      public static void main(String[] args) throws Exception {
      new URL( "http://www.dummy.com" ).openConnection().setDefaultUseCaches(false);
      ServiceLoader.load(IService.class).forEach(s -> System.out.println(s.getClass().getName()));
      }
      }

      IService.java:

      package simplewebstart;

      public interface IService {
      }

      ServiceImpl.java:

      package simplewebstart;

      public class ServiceImpl implements IService {
      }


      META-INF/services/simplewebstart.IService:

      simplewebstart.ServiceImpl
      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pardesha Pardeep Sharma
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: