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

jimage expand && jimage create doesn't create usable jimage

    XMLWordPrintable

    Details

      Description

      Consider this:

      $ bin/jimage expand --dir tmp lib/modules/bootmodules.jimage
      $ bin/jimage create --dir tmp lib/modules/bootmodules.jimage.new
      $ mv lib/modules/bootmodules.jimage.new lib/modules/bootmodules.jimage
      $ bin/java Test
      Error: A JNI error has occurred, please check your installation and try again
      Exception in thread "main" java.lang.ExceptionInInitializerError
      at sun.launcher.LauncherHelper$ResourceBundleHolder.<clinit>(LauncherHelper.java:97)
      at sun.launcher.LauncherHelper.getLocalizedMessage(LauncherHelper.java:327)
      at sun.launcher.LauncherHelper.abort(LauncherHelper.java:450)
      at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:517)
      Caused by: java.lang.NullPointerException
      at jdk.internal.jimage.BasicImageReader.getResource(BasicImageReader.java:202)
      at jdk.internal.jimage.PackageModuleMap.readFrom(PackageModuleMap.java:62)
      at jdk.internal.jimage.ImageReader.open(ImageReader.java:92)
      at jdk.internal.jimage.ImageReader.open(ImageReader.java:100)
      at sun.misc.URLClassPath$JImageLoader.<init>(URLClassPath.java:1137)
      at sun.misc.URLClassPath$3.run(URLClassPath.java:373)
      at sun.misc.URLClassPath$3.run(URLClassPath.java:361)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.misc.URLClassPath.getLoader(URLClassPath.java:360)
      at sun.misc.URLClassPath.getLoader(URLClassPath.java:337)
      at sun.misc.URLClassPath.access$000(URLClassPath.java:64)
      at sun.misc.URLClassPath$2.next(URLClassPath.java:277)
      at sun.misc.URLClassPath$2.hasMoreElements(URLClassPath.java:288)
      at java.lang.ClassLoader$2.hasMoreElements(ClassLoader.java:1276)
      at sun.misc.CompoundEnumeration.next(CompoundEnumeration.java:45)
      at sun.misc.CompoundEnumeration.hasMoreElements(CompoundEnumeration.java:54)
      at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:354)
      at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393)
      at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474)
      at java.util.ResourceBundle.<clinit>(ResourceBundle.java:377)
      ... 4 more


      Alexey Fedorchenko reports something similar but he gets:

      "Error occurred during initialization of VM
      java/lang/NoClassDefFoundError: java/lang/Object"

      on a Windows build.

        Attachments

          Activity

            People

            • Assignee:
              jlaskey Jim Laskey
              Reporter:
              alanb Alan Bateman
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: