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

ExceptionInInitializerError if images build patched to use exploded version of jdk.internal.module.SystemModules

XMLWordPrintable


      Consider the following:

      $ images/jdk/bin/java -Xpatch:java.base=jdk/modules/java.base -version
      Error occurred during initialization of VM
      java.lang.ExceptionInInitializerError
      at java.lang.module.ModuleFinder.ofSystem(java.base/ModuleFinder.java:166)
      at jdk.internal.module.ModuleBootstrap.boot(java.base/ModuleBootstrap.java:105)
      at java.lang.System.initPhase2(java.base/System.java:1924)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
      at java.lang.module.SystemModuleFinder.<clinit>(java.base/SystemModuleFinder.java:107)
      at java.lang.module.ModuleFinder.ofSystem(java.base/ModuleFinder.java:166)
      at jdk.internal.module.ModuleBootstrap.boot(java.base/ModuleBootstrap.java:105)
      at java.lang.System.initPhase2(java.base/System.java:1924)

      The issue here is that the runtime image is an images build but the classes for java.base are loaded from the exploded build. This means that the checked-in java.lang.module.SystemModules is loaded rather then the generated classes.

            mchung Mandy Chung (Inactive)
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: