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
2022-03-01 10:27:25,791 ERROR [org.acm.hib.rea.FruitsRoutes] (vert.x-eventloop-thread-1) Failed to handle request: java.lang.IllegalStateException: The current operation requires a safe (isolated) Vert.x sub-context, but the current context hasn't been flagged as such. You can still use Hibernate Reactive, you just need to avoid using the methods which implicitly require accessing the stateful context, such as MutinySessionFactory#withTransaction and #withSession.
at io.quarkus.vertx.core.runtime.context.VertxContextSafetyToggle.checkIsSafe(VertxContextSafetyToggle.java:80)
at io.quarkus.vertx.core.runtime.context.VertxContextSafetyToggle.validateContextIfExists(VertxContextSafetyToggle.java:63)
at io.quarkus.hibernate.reactive.runtime.customized.CheckingVertxContext.get(CheckingVertxContext.java:46)
at org.hibernate.reactive.mutiny.impl.MutinySessionFactoryImpl.withSession(MutinySessionFactoryImpl.java:189)
at org.acme.hibernate.reactive.FruitsRoutes.getAll(FruitsRoutes.java:39)
...
Describe the bug
quarkus-reactive-routes based code fails when using Mutiny.SessionFactory.withSession
hibernate-reactive-routes-quickstart is failing since #23719 got merged
Code link https://github.com/quarkusio/quarkus-quickstarts/blob/main/hibernate-reactive-routes-quickstart/src/main/java/org/acme/hibernate/reactive/FruitsRoutes.java#L39
Zulip chat - https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/hibernate-reactive-routes-quickstart/near/273641831
Conclusion: the vert.x http server didn't mark the context as safe
Expected behavior
hibernate-reactive-routes-quickstart is passing
Actual behavior
hibernate-reactive-routes-quickstart is failing
How to Reproduce?
Run hibernate-reactive-routes-quickstart
Output of
uname -a
orver
macOS Monterey
Output of
java -version
Java 17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
Quarkus main
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: