-
Bug
-
Resolution: Done
-
Major
-
3.15.1.Final
-
None
Per the analysis by ropalka of JPMS --add-opens calls needed by WildFly when running on SE 16+ (see [1]), we need --add-opens=java.base/java.lang.invoke=ALL-UNNAMED due to this:
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.invoke.MethodHandles$Lookup(java.lang.Class) accessible: module java.base does not "opens java.lang.invoke" to unnamed module @7cdb1e58 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188) at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181) at org.jboss.resteasy.resteasy-client-microprofile@3.15.1.Final//org.jboss.resteasy.microprofile.client.header.HeaderUtils.createMethodHandle(HeaderUtils.java:31) at org.jboss.resteasy.resteasy-client-microprofile@3.15.1.Final//org.jboss.resteasy.microprofile.client.header.DefaultHeaderFiller.<init>(DefaultHeaderFiller.java:40) at org.jboss.resteasy.resteasy-client-microprofile@3.15.1.Final//org.jboss.resteasy.microprofile.client.header.DefaultHeaderFillerFactory.createFiller(DefaultHeaderFillerFactory.java:19) at org.jboss.resteasy.resteasy-client-microprofile@3.15.1.Final//org.jboss.resteasy.microprofile.client.header.ClientHeaderGenerator.<init>(ClientHeaderGenerator.java:35) at org.jboss.resteasy.resteasy-client-microprofile@3.15.1.Final//org.jboss.resteasy.microprofile.client.header.ClientHeaderProvider.forMethod(ClientHeaderProvider.java:32) at org.jboss.resteasy.resteasy-client-microprofile@3.15.1.Final//org.jboss.resteasy.microprofile.client.header.ClientHeaderProviders.registerForMethod(ClientHeaderProviders.java:98) at org.jboss.resteasy.resteasy-client-microprofile@3.15.1.Final//org.jboss.resteasy.microprofile.client.header.ClientHeaderProviders.lambda$registerForClass$0(ClientHeaderProviders.java:72) at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) at org.jboss.resteasy.resteasy-client-microprofile@3.15.1.Final//org.jboss.resteasy.microprofile.client.header.ClientHeaderProviders.registerForClass(ClientHeaderProviders.java:72) at org.jboss.resteasy.resteasy-client-microprofile@3.15.1.Final//org.jboss.resteasy.microprofile.client.RestClientBuilderImpl.build(RestClientBuilderImpl.java:341) at deployment.InvalidInterfaceTest.war//org.eclipse.microprofile.rest.client.tck.InvalidInterfaceTest.testExceptionThrownWhenMultipleClientHeaderParamsSpecifySameHeaderOnMethod(InvalidInterfaceTest.java:90)
The smallrye faulttolerance project has code similar to what HeaderUtils does[2] but they use a multi-release jar to provide a different implementation on JDK9+[3]. If that approach is suitable to RESTEasy it would be nice as it would eliminate the need for WildFly to open that module/package.
[1] WFCORE-5406 attachment file https://issues.redhat.com/secure/attachment/12523672/modular-params-needed-analysis.txt
- blocks
-
WFCORE-5459 Remove the required add-opens JVM arguments required by RESTEasy
- Open
- is blocked by
-
RESTEASY-2907 Require a minimum of Java 11 for compiling RESTEasy
- Closed
- relates to
-
RESTEASY-3050 HeaderUtils requires --add-opens on JDK 17
- Closed