JDK-8155957 : java.lang.IllegalAccessError: class (in unnamed module XXX) cannot access class jdk.internal.misc.Unsafe
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-05-03
  • Updated: 2017-08-17
  • Resolved: 2016-05-24
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 b122Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8155958 :  
Description
19 or so tests are failing with similar exceptions:

java.lang.IllegalAccessError: class TestShrinkAuxiliaryData (in unnamed module @0xd3e8ae0) cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @0xd3e8ae0
	at TestShrinkAuxiliaryData.getMaxCacheSize(TestShrinkAuxiliaryData.java:148)
	at TestShrinkAuxiliaryData.test(TestShrinkAuxiliaryData.java:69)
	at TestShrinkAuxiliaryData00.main(TestShrinkAuxiliaryData00.java:43)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
	at jdk.internal.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)

Comments
@run driver doesn't respect @modules header. command: driver TestShrinkAuxiliaryData00 reason: User specified action: run driver/timeout=720 TestShrinkAuxiliaryData00 Mode: othervm elapsed time (seconds): 1.927 configuration: Boot Layer add exports: java.base/jdk.internal.misc ALL-UNNAMED STDOUT: STDERR: java.lang.IllegalAccessError: class TestShrinkAuxiliaryData (in unnamed module @0x2e92961b) cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @0x2e92961b
13-05-2016

Also changed priority from P1 -> P2.
03-05-2016

Moved integration_blocker to the quarantine subtask.
03-05-2016

Dmitry Samersoff commented in IM: "I expect gc/g1/TestShrinkAuxillaryDataNN to fail. All of them uses the single helper and this helper have to add -XaddExport explicitly."
03-05-2016