Skip to content

Instantly share code, notes, and snippets.

@kabir
Last active February 21, 2020 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kabir/aeefb9622c4688e32c8c1191f2027c16 to your computer and use it in GitHub Desktop.
Save kabir/aeefb9622c4688e32c8c1191f2027c16 to your computer and use it in GitHub Desktop.
MP F2F 2020 Context Propagatio errors

====== "RestEasy" ======

2020-02-21 10:23:46,561 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (pool-11-thread-1) RESTEASY002005: Failed executing GET /context/resteasy: org.jboss.resteasy.spi.LoggableFailure: RESTEASY003880: Unable to find contextual data of type: javax.ws.rs.core.UriInfo
        at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:77)
        at com.sun.proxy.$Proxy66.getAbsolutePath(Unknown Source)
        at org.wildfly.test.integration.microprofile.context.propagation.rest.ContextPropagationEndpoint.lambda$resteasyTest$1(ContextPropagationEndpoint.java:75)
        at io.smallrye.context.SmallRyeThreadContext$ContextualFunction.apply(SmallRyeThreadContext.java:76)
        at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
        at io.smallrye.context.SmallRyeThreadContext$ContextualRunnable.run(SmallRyeThreadContext.java:56)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

===== "Servlet" ===== WildFly

2020-02-21 11:00:35,073 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (pool-11-thread-1) RESTEASY002005: Failed executing GET /context/servlet: org.jboss.resteasy.spi.LoggableFailure: RESTEASY003880: Unable to find contextual data of type: javax.servlet.http.HttpServletRequest
        at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:77)
        at com.sun.proxy.$Proxy66.getContentType(Unknown Source)
        at org.wildfly.test.integration.microprofile.context.propagation.rest.ContextPropagationEndpoint.lambda$servletTest$2(ContextPropagationEndpoint.java:85)
        at io.smallrye.context.SmallRyeThreadContext$ContextualFunction.apply(SmallRyeThreadContext.java:76)
        at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
        at io.smallrye.context.SmallRyeThreadContext$ContextualRunnable.run(SmallRyeThreadContext.java:56)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

3.12 ContextParameterInjector.GeneratingDelegatingProxy (WildFly) has

Object delegate = ResteasyProviderFactory.getContextData(type);

while 4.1 ContextParameterInjector.GeneratingDelegatingProxy (Quarkus) has

Object delegate = factory.getContextData(rawType, genericType, annotations, false);

But Quarkus does not seem to use this at all (loads of Arc stuff in the client proxy)

getContentType:645, HttpServletRequestImpl {io.undertow.servlet.spec}
getContentType:60, ServletProducer_ProducerMethod_request_eaedc3e40b2e72a682c41b95c654df6e208065d2_ClientProxy {io.quarkus.undertow.runtime}
lambda$servletTest$2:76, ContextEndpoint {io.quarkus.context.test}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment