-
Bug
-
Resolution: Done
-
Major
-
7.2.0.GA, 7.2.1.GA
Request for including RESTEASY-2157 fix in a next EAP 7.2.z.GA patch (in 7.2.2 if possible).
Use case / Issue:
-------------------
A servlet is providing a webservice. The servlet is secured using a custom elytron realm and HTTP basic authentication. The custom elytron realm is provided as JBoss module. The realm should call an external REST service (identity store) during authentication using a Resteasy client.
Resteasy is not able to load the proxy interface and throws an exception as such:
~~~
12:38:36,269 ERROR [:] [frito.jbp.elytron.MyRealm] (default task-1) java.lang.IllegalArgumentException: interface frito.jbp.elytron.RESTServiceInterface is not visible from class loader: java.lang.IllegalArgumentException: interface frito.jbp.elytron.RESTServiceInterface is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:581) [rt.jar:1.8.0_162]
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557) [rt.jar:1.8.0_162]
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230) [rt.jar:1.8.0_162]
at java.lang.reflect.WeakCache.get(WeakCache.java:127) [rt.jar:1.8.0_162]
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419) [rt.jar:1.8.0_162]
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719) [rt.jar:1.8.0_162]
at org.jboss.resteasy.client.jaxrs.ProxyBuilder.proxy(ProxyBuilder.java:85) [resteasy-client-3.6.1.SP2-redhat-00001.jar:3.6.1.SP2-redhat-00001]
at org.jboss.resteasy.client.jaxrs.ProxyBuilder.build(ProxyBuilder.java:152) [resteasy-client-3.6.1.SP2-redhat-00001.jar:3.6.1.SP2-redhat-00001]
at org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.proxy(ClientWebTarget.java:93) [resteasy-client-3.6.1.SP2-redhat-00001.jar:3.6.1.SP2-redhat-00001]
at frito.jbp.elytron.MyRealm$1.verifyEvidence(MyRealm.java:92)
...
~~~
Expeced behavior:
--------------------
It's expected that the realm is able to load classes from its own module.
The Resteasy client should build a dynamic proxy using an annotated interface. The interface is located within the JBoss module, along with the realm implementation.
- is incorporated by
-
JBEAP-16360 (7.2.z) Upgrade RESTEasy from 3.6.1.SP3 to 3.6.1.SP5
- Closed