JDK-8160923 : sun/tools/jps/TestJpsJar.java fails due to ClassNotFoundException: jdk.testlibrary.ProcessTools
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2016-07-06
  • Updated: 2016-09-22
  • Resolved: 2016-08-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b137Fixed
Related Reports
Relates :  
Relates :  
Sub Tasks
JDK-8161010 :  
Description
In the 2016-07-04 JDK9-hs nightly, sun/tools/jps/TestJpsJar.java
failed due to:

Exception in thread "main" java.lang.NoClassDefFoundError: jdk/testlibrary/ProcessTools
	at JpsBase.main(JpsBase.java:63)
Caused by: java.lang.ClassNotFoundException: jdk.testlibrary.ProcessTools
	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:185)
	at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419)
	... 1 more

The test failed in a total of 8 configs in the 2016-07-04 JDK9-hs nightly.
Comments
Most likely similar issue as we have in Hotspot, JDK-8157957 will fix this. Misuse of @build for shared classes leads to CNF exceptions.
28-07-2016

Nothing in the import part of the test was changed since Thu May 07 09:11:49 2015 JpsBase.java is a common class for all jps tests, but the only failing test is TestJpsJar. TestJpsJar is differ from other jps tests - it uses othervm mode. So: something changes in the *lab* - new host, new configuration, new jtreg version and the test start failing. jtreg is a suspect and I'm looking further into the problem.
08-07-2016

1. Exception in thread "main" java.lang.NoClassDefFoundError: jdk/testlibrary/ProcessTools at JpsBase.main(JpsBase.java:63) 2. # hg ann JpsBase.java 10467: import jdk.testlibrary.OutputAnalyzer; 10467: import jdk.testlibrary.ProcessTools; # hg ann TestJpsJar.java 10467: import jdk.testlibrary.OutputAnalyzer; 10467: import jdk.testlibrary.ProcessTools; 10467: 10467: /* 10467: * @test 10467: * @library /lib/testlibrary 11883: * @modules jdk.jartool/sun.tools.jar 11883: * java.management 10467: * @build jdk.testlibrary.* JpsHelper JpsBase 11883: * @run main/othervm TestJpsJar 10467: */ # hg log TestJpsJar.java changeset: 11883:b45c81ca8671 user: ykantser date: Thu May 07 09:11:49 2015 +0200 summary: 8078896: Add @modules as needed to the jdk_svc tests ... changeset: 10467:6407a15e2274 parent: 10464:362a6ea9bc84 user: ykantser date: Fri Aug 15 12:28:58 2014 +0200 summary: 8054278: Refactor jps utility tests 3. Not able to reproduce the problem locally
08-07-2016

This test (sun/tools/jps/TestJpsJar.java) has been quarantined by JDK-8161010. Don't forget to unquarantine the test when this bug is fixed.
08-07-2016

This test's failure mode happened in the 2016-07-01 JDK9-hs PIT in all configurations. The PIT was given a "GO" and this failure mode has escaped to JDK9-dev. This is no longer an integration_blocker.
07-07-2016

I'm not convinced (yet), that this is not an integration_blocker.
07-07-2016

Dmitry, can you take a look at this integration_blocker? You've been working on this test recently... I see these failures in the 2016-07-04 and 2016-07-05 JDK9-hs nightly, but I don't see it in the 2016-07-01 JDK9-hs nightly.
06-07-2016