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

Cannot call BootLoader::loadClassOrNull before initPhase2

    XMLWordPrintable

Details

    • b23

    Description

      test/jdk/java/lang/invoke/VarHandles/VarHandleTestMethodType* tests fail with an empty ArchivedClassLoaders::packageToModule when running with [1].

      java.util.ServiceConfigurationError: Locale provider adapter "CLDR"cannot be instantiated.
      at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:199)
      at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:287)
      at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:258)
      at java.base/java.util.Calendar.createCalendar(Calendar.java:1693)
      at java.base/java.util.Calendar.getInstance(Calendar.java:1661)
      at java.base/java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:680)
      at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:624)
      at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:603)
      at org.testng.reporters.XMLReporter.addDurationAttributes(XMLReporter.java:180)
      at org.testng.reporters.XMLReporter.getSuiteAttributes(XMLReporter.java:171)
      at org.testng.reporters.XMLReporter.writeSuiteToBuffer(XMLReporter.java:114)
      at org.testng.reporters.XMLReporter.writeSuite(XMLReporter.java:86)
      at org.testng.reporters.XMLReporter.generateReport(XMLReporter.java:63)
      at org.testng.TestNG.generateReports(TestNG.java:1076)
      at org.testng.TestNG.run(TestNG.java:1035)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
      at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
      at java.base/jdk.internal.reflect.DirectMethodAccessorImpl$StaticMethodAccessor.invoke(DirectMethodAccessorImpl.java:150)
      at java.base/java.lang.reflect.Method.invoke(Method.java:574)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:831)
      Caused by: java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.DirectConstructorAccessorImpl.newInstance(DirectConstructorAccessorImpl.java:91)
      at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
      at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:188)
      ... 20 more
      Caused by: java.util.ServiceConfigurationError: sun.util.locale.provider.LocaleDataMetaInfo: Provider sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo not found
      at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:589)
      at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:868)
      at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1076)
      at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
      at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1383)
      at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:89)
      at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:86)
      at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
      at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.<init>(CLDRLocaleProviderAdapter.java:86)
      at java.base/jdk.internal.reflect.DirectConstructorAccessorImpl.newInstance(DirectConstructorAccessorImpl.java:79)
      ... 23 more

      It happens only when -Djava.lang.invoke.VarHandle.VAR_HANDLE_IDENTITY_ADAPT=true is set (fastdebug build).

      The tests pass when running with -Xshare:off or disable the archived module graph by setting "-Djdk.module.showModuleResolution" when disabled the archive module graph but no trace output.

      [1] https://github.com/openjdk/jdk/compare/master...mlchung:method-invoke-4

      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              mchung Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: