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

[TESTBUG] Add @build of test library classes to runtime/NMT tests to avoid NoClassDefFoundError

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot

      Description

      Sometimes NMT tests failed when executed in parallel with following error:
      java.lang.NoClassDefFoundError: jdk/test/lib/JDKToolFinder
      at jdk.test.lib.ProcessTools.createJavaProcessBuilder(ProcessTools.java:150)
      at jdk.test.lib.ProcessTools.createJavaProcessBuilder(ProcessTools.java:146)
      at CommandLineEmptyArgument.main(CommandLineEmptyArgument.java:38)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
      at java.lang.Thread.run(java.base@9-internal/Thread.java:804)
      Caused by: java.lang.ClassNotFoundException: jdk.test.lib.JDKToolFinder
      at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-internal/BuiltinClassLoader.java:366)
      at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-internal/ClassLoaders.java:184)
      at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419)
      ... 9 more

      Adding explicit @build statements for test library classes can help to avoid such errors.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ctornqvi Christian Tornqvist
                Reporter:
                ddmitriev Dmitry Dmitriev
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: