Proxy classes and reflection (IllegalAccessException)

Alan Bateman Alan.Bateman at oracle.com
Fri Apr 8 12:43:02 UTC 2016



On 08/04/2016 12:58, Dawid Weiss wrote:
> :
>
> The one referencing the problematic class is:
>
> PROXY: jdk.proxy2/com.sun.proxy.jdk.proxy2.$Proxy65 defined by
> jdk.internal.loader.ClassLoaders$PlatformClassLoader at 523884b2
>     java.annotations.common/javax.ws.rs.ext.Providers module-private
> loader jdk.internal.loader.ClassLoaders$PlatformClassLoader at 523884b2
I don't have time to look it just now but 
java.annotations.common/javax.ws.rs.ext.Providers is 
<module-name>/<class-name> and I wouldn't have expected to see this type 
javax.ws.rs.ext.Providers in this module. It makes me wonder if JAX-RS 
classes have been added or patched into this module. If added to the 
module then javax.ws.rs.ext won't be exported by default, hence 
interface javax.ws.rs.ext.Providers is not accessible to anything 
outside of this module, hence the dynamic module.

> :
>
> I modified this locally and removed the proxy cache. On subsequent run
> everything worked until I hit another problem, this time somewhere
> inside Groovy (reflective scan of all fields, very likely).
There was some discussion on Groovy here a few months ago and it will be 
challenge. There were originally a few challenges getting Nashorn 
(JavaScript) to run too but nothing like this.

-Alan


More information about the jigsaw-dev mailing list