Proxy classes and reflection (IllegalAccessException)
Dawid Weiss
dawid.weiss at gmail.com
Thu Apr 7 11:39:20 UTC 2016
I don't want to hijack the other thread, so here's a new one I'm stuck
with. I get this exception (simplified stack trace a bit):
Caused by: java.lang.IllegalAccessException: class
org.jboss.resteasy.core.ContextParameterInjector cannot access class
com.sun.proxy.jdk.proxy2.$Proxy65 (in module jdk.proxy2) because
module jdk.proxy2 does not export com.sun.proxy.jdk.proxy2 to unnamed
module @79ca92b9
at sun.reflect.Reflection.throwIllegalAccessException(java.base at 9-ea/Reflection.java:411)
at sun.reflect.Reflection.throwIllegalAccessException(java.base at 9-ea/Reflection.java:402)
at sun.reflect.Reflection.ensureMemberAccess(java.base at 9-ea/Reflection.java:99)
at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(java.base at 9-ea/AccessibleObject.java:355)
at java.lang.reflect.AccessibleObject.checkAccess(java.base at 9-ea/AccessibleObject.java:347)
at java.lang.reflect.Constructor.newInstance(java.base at 9-ea/Constructor.java:444)
at org.jboss.resteasy.core.ContextParameterInjector.createProxy(ContextParameterInjector.java:94)
... 53 more
I think RestEasy attempts to do create a new instance of a proxy class
here (the complete process here eludes my understanding for now). Any
clues how this can be solved?
Dawid
More information about the jigsaw-dev
mailing list