JDK-8154184 : serviceability/tmtools/jstat/GcCauseTest01.java fails with exception: java.lang.NoClassDefFoundError: jdk/test/lib/Platform
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2016-04-13
  • Updated: 2016-06-17
  • Resolved: 2016-06-17
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
9Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Affected tests:
serviceability/tmtools/jstat/GcCauseTest01.java

Failure:
----------System.err:(21/1366)----------
java.lang.NoClassDefFoundError: jdk/test/lib/Platform
	at common.TmTool.adjustForTestJava(TmTool.java:63)
	at common.TmTool.<init>(TmTool.java:41)
	at utils.JstatGcCauseTool.<init>(JstatGcCauseTool.java:34)
	at GcCauseTest01.main(GcCauseTest01.java:46)
	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:843)
Caused by: java.lang.ClassNotFoundException: jdk.test.lib.Platform
	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)
	... 10 more

JavaTest Message: Test threw exception: java.lang.NoClassDefFoundError: jdk/test/lib/Platform
JavaTest Message: shutting down test
Comments
[~ctornqvi], is this a duplicate of the other testlibrary bug? If so, please close as duplicate.
13-06-2016

I'm moving this to SVC since it is a testbug and not a GC problem. The problem lies with JTtreg and the multiple testlibraries.
01-06-2016

I don't think this is a duplicate of JDK-8154258. JDK-8154258 is a jigsaw problem, where as this is CR is a problem with how the JTreg tests compile libraries to different directories. Edit: fixed JDK links
06-05-2016

Similar, if not a duplicate.
04-05-2016

Is this a duplicate of JDK-8154258? And so it's fixed?
04-05-2016

http://aurora.ru.oracle.com/functional/faces/RunDetails.xhtml?names=1440737.JAVASE.NIGHTLY.VM.GC_Baseline-G1.2016-04-29-107 RULE "serviceability/tmtools/jstack/SpreadLockTest.java" Exception java.lang.ClassNotFoundException: jdk.test.lib.Platform RULE "serviceability/tmtools/jstack/SpreadLockTest.java" Exception java.lang.NoClassDefFoundError: jdk/test/lib/Platform
03-05-2016

serviceability/tmtools/jstack/WaitNotifyThreadTest.java test also affected by this problem.
19-04-2016

This is probably a build dependency problem in jtreg and/or the serviceability test. The following reproduces the problem: jtreg -va -jdk:../build/linux-x86_64-normal-server-release/jdk test/serviceability/tmtools/jstat/GcCauseTest01.java rm -r JTwork/classes/serviceability/tmtools/share/jdk jtreg -va -jdk:../build/linux-x86_64-normal-server-release/jdk test/serviceability/tmtools/jstat/GcCauseTest01.java And my _guess_ is the reason why we got this problem during the test run is that some earlier compilation compiled jdk.test.lib into the /testlibrary directory instead of ../share. A workaround fix is to add: @build jdk.test.lib.* To solve that the transitive dependency GcCauseTest01 -> common.TmTools -> jdk.test.lib.Platform. However, note that this is a workaround, and it's probably not the preferred final solution.
14-04-2016