IllegalAccessError: class jdk.test.lib.Utils cannot access class jdk.internal.misc.Unsafe
Gustavo Romero
gromero at linux.vnet.ibm.com
Wed Aug 24 23:04:31 UTC 2016
Hi Dmitry,
On 19-08-2016 09:51, Dmitry Samersoff wrote:
> 1. Make sure you have fresh jdk9 workspace
> 2. Make sure you have recent jtreg
1. Checked. It's purged and I'm using only the forest tips;
2. I'm using the most recent found on cloudbees ( > b03 ) [1].
I'm testing on jdk9/hs-comp repo (instead of jdk9/jdk9) because I'm
assuming that most fresh changesets on hotpot will be there. Am I wrong?
(Did you mean jdk9/jdk9 by "jdk9 workspace"?)
Anyway, the same problem occurs on jdk9/jdk9:
Error log for jdk9/jdk9:
https://paste.fedoraproject.org/413618/raw/
Error log for jdk9/hs-comp:
https://paste.fedoraproject.org/413619/raw/
>
> Please check:
>
> https://bugs.openjdk.java.net/browse/JDK-8154258
> https://bugs.openjdk.java.net/browse/JDK-8155957
Thank you for pointing out references on that issue. As these patches are
already on jdk9/jdk9 I'm assuming that they do not fix the issue directly.
I'm not much familiar with the transition from class path to the module
system. I was able to workaround the issue using the following patch
(which obviously is not the right way to fix it - but I had to use it since
I'm primarily focused on the RTM tests internal functionality):
diff -r 84edc0512b0e src/java.base/share/classes/module-info.java
--- a/src/java.base/share/classes/module-info.java Thu Aug 11 16:22:09 2016 -0700
+++ b/src/java.base/share/classes/module-info.java Wed Aug 24 18:58:19 2016 -0400
@@ -152,6 +152,8 @@
jdk.dynalink,
jdk.jartool,
jdk.jlink;
+ exports jdk.internal.misc;
+/*
exports jdk.internal.misc to
java.corba,
java.desktop,
@@ -170,6 +172,7 @@
jdk.scripting.nashorn,
jdk.unsupported,
jdk.vm.ci;
+*/
exports jdk.internal.perf to
java.desktop,
java.management,
Now they run fine, for instance:
https://paste.fedoraproject.org/413621/raw/
(It fails but it's not the run, but the test itself. The remaining tests
also run fine now)
Should I open a bug for it?
Thanks a lot!
Best regards,
Gustavo
[1] https://adopt-openjdk.ci.cloudbees.com/job/jtreg/lastSuccessfulBuild/artifact/
More information about the hotspot-dev
mailing list