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

several langtools tests depend on jar, jlink, javac but do not declare that dependency

    Details

    • Resolved In Build:
      b01

      Description

      tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java, tools/pack200/ModuleAttributes.java and tools/pack200/Pack200Props.java fail when run --limit-modules java.logging,java.scripting,java.rmi,java.sql,java.xml. tools/pack200 tests fail w/ 'java.nio.file.ProviderNotFoundException: Provider "jar" not found'[1] and
      tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java fails due to java.lang.RuntimeException: jar tool not found[2]

      [1]
      #section:main
      ----------messages:(4/133)----------
      command: main ModuleAttributes
      reason: User specified action: run main ModuleAttributes
      Mode: othervm
      elapsed time (seconds): 0.467
      ----------configuration:(3/84)----------
      Boot Layer
        limit modules: java.logging java.scripting java.rmi java.sql java.xml

      ----------System.out:(0/0)----------
      ----------System.err:(18/1139)----------
      java.nio.file.ProviderNotFoundException: Provider "jar" not found
      at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:362)
      at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:291)
      at Utils$JrtToZip.run(Utils.java:617)
      at Utils.createRtJar(Utils.java:592)
      at ModuleAttributes.run(ModuleAttributes.java:42)
      at ModuleAttributes.main(ModuleAttributes.java:38)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:563)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
      at java.base/java.lang.Thread.run(Thread.java:844)

      JavaTest Message: Test threw exception: java.nio.file.ProviderNotFoundException: Provider "jar" not found
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.nio.file.ProviderNotFoundException: Provider "jar" not found

      [2]
      #section:testng
      ----------messages:(5/323)----------
      command: testng JLinkMultiReleaseJarTest
      reason: User specified action: run testng JLinkMultiReleaseJarTest
      Mode: othervm
      Additional options from @modules: --add-modules java.base --add-exports java.base/jdk.internal.jimage=ALL-UNNAMED --add-exports java.base/jdk.internal.module=ALL-UNNAMED
      elapsed time (seconds): 0.893
      ----------configuration:(6/251)----------
      Boot Layer
        add modules: java.base
        limit modules: java.logging java.scripting java.rmi java.sql java.xml
        add exports: java.base/jdk.internal.jimage ALL-UNNAMED
                       java.base/jdk.internal.module ALL-UNNAMED

      ----------System.out:(0/0)----------
      ----------System.err:(45/2981)----------
      org.testng.TestNGException:
      An error occurred while instantiating class JLinkMultiReleaseJarTest: null
      at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:393)
      at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
      at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
      at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
      at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
      at org.testng.TestRunner.initMethods(TestRunner.java:415)
      at org.testng.TestRunner.init(TestRunner.java:241)
      at org.testng.TestRunner.init(TestRunner.java:211)
      at org.testng.TestRunner.<init>(TestRunner.java:158)
      at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:545)
      at org.testng.SuiteRunner.init(SuiteRunner.java:159)
      at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
      at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
      at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
      at org.testng.TestNG.run(TestNG.java:1018)
      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.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:563)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
      at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: java.lang.ExceptionInInitializerError
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:487)
      at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
      at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
      ... 23 more
      Caused by: java.lang.RuntimeException: jar tool not found
      at JLinkMultiReleaseJarTest.lambda$static$0(JLinkMultiReleaseJarTest.java:63)
      at java.base/java.util.Optional.orElseThrow(Optional.java:385)
      at JLinkMultiReleaseJarTest.<clinit>(JLinkMultiReleaseJarTest.java:63)
      ... 29 more

      JavaTest Message: Test threw exception: org.testng.TestNGException:
      An error occurred while instantiating class JLinkMultiReleaseJarTest: null
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: org.testng.TestNGException: An error occurred while instantiating class JLinkMultiReleaseJarTest: null

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                anazarov Andrey Nazarov
                Reporter:
                iignatyev Igor Ignatyev
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: