You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resteasy-reactive : JPA TenantResolver fails with Normal scoped producer method may not return null: io.quarkus.vertx.http.runtime.CurrentVertxRequest
#16934
Closed
laurentperez opened this issue
May 1, 2021
· 1 comment
· Fixed by #16936
If this is a bug (?), maybe the documentation should be updated too to show example of context.
Actual behavior
throws on context.getRequest()
2021-05-01 20:53:11.353 CEST+0200 (executor-thread-1 #80) (GradleWorkerMain pid:411885) org.jboss.resteasy.reactive.server.core.ExceptionMapping ERROR Request failed : javax.enterprise.inject.IllegalProductException: Normal scoped producer method may not return null: io.quarkus.vertx.http.runtime.CurrentVertxRequest.getCurrent()
at io.quarkus.vertx.http.runtime.CurrentVertxRequest_ProducerMethod_getCurrent_6dc23d16d53ba5c34e1e7b6f54290fd7b9aebd76_Bean.create(CurrentVertxRequest_ProducerMethod_getCurrent_6dc23d16d53ba5c34e1e7b6f54290fd7b9aebd76_Bean.zig:178)
at io.quarkus.vertx.http.runtime.CurrentVertxRequest_ProducerMethod_getCurrent_6dc23d16d53ba5c34e1e7b6f54290fd7b9aebd76_Bean.create(CurrentVertxRequest_ProducerMethod_getCurrent_6dc23d16d53ba5c34e1e7b6f54290fd7b9aebd76_Bean.zig:197)
at io.quarkus.arc.impl.RequestContext.getIfActive(RequestContext.java:68)
at io.quarkus.arc.impl.ClientProxies.getDelegate(ClientProxies.java:33)
at io.quarkus.vertx.http.runtime.CurrentVertxRequest_ProducerMethod_getCurrent_6dc23d16d53ba5c34e1e7b6f54290fd7b9aebd76_ClientProxy.arc$delegate(CurrentVertxRequest_ProducerMethod_getCurrent_6dc23d16d53ba5c34e1e7b6f54290fd7b9aebd76_ClientProxy.zig:60)
at io.quarkus.vertx.http.runtime.CurrentVertxRequest_ProducerMethod_getCurrent_6dc23d16d53ba5c34e1e7b6f54290fd7b9aebd76_ClientProxy.request(CurrentVertxRequest_ProducerMethod_getCurrent_6dc23d16d53ba5c34e1e7b6f54290fd7b9aebd76_ClientProxy.zig:302)
at com.xxxxxxxxxxxxxxx.resolveTenantId(JPATenantResolver.kt:19)
at com.xxxxx.JPATenantResolver_ClientProxy.resolveTenantId(JPATenantResolver_ClientProxy.zig:238)
To Reproduce
see above
Environment (please complete the following information):
jdk11 qk 1.13.3
The text was updated successfully, but these errors were encountered:
Describe the bug
Following https://quarkus.io/guides/hibernate-orm#writing-the-application
@RequestScoped
TenantResolver
, inject Vertx routingContext to get access to the request context (path, parameters)@Blocking
to the controller using JPA to let the method run on worker thread and not slow down the event loop@GET and @Path
, not reactive routes, see belowExpected behavior
Vertx routing context to be accessible when we use resteasy-reactive
I guess it's related to #13262
I see that https://quarkus.io/guides/reactive-routes exists and has a
RoutingExchange
, but I don't see how to "see" it within theTenantResolver
If this is a bug (?), maybe the documentation should be updated too to show example of context.
Actual behavior
throws on
context.getRequest()
To Reproduce
see above
Environment (please complete the following information):
jdk11 qk 1.13.3
The text was updated successfully, but these errors were encountered: