-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid config value prevents app to startup with invalid stacktrace instead of validation error message #31434
Comments
/cc @brunobat (opentelemetry,tracing), @radcortez (opentelemetry,tracing) |
I found when the problem is present in our backend code: during execution of any Quartz Should Quartz scheduler activate request-scope as simple scheduler or must be a user choice (eg. using /cc @gsmet |
I am pretty we have discussed this before and decided against it because scheduled jobs can be very long running. |
Reading around Quarkus documentation I understood that the request-scope is a wide concept in Quarkus and it's not strictly tied to HTTP request; why how the request duration can be a discriminator for request-scope activation? I'm asking that because I was temped to activate request scope in our quartz' jobs to be able to use |
It ties up hardware resources |
I think that we do activate the request context even for a Quartz scheduled job, unless it's a kotlin continuation; i.e. the |
I added a small reproducer (https://github.com/luca-bassoricci/contextnotactive_issue) similar at |
Wait a minute - you don't use the Quakus API in this reproducer, i.e. no |
So I must annotate |
Check for an active RequestContext before accessing ResteasyReactiveLocaleResolver#currentVertxRequest to prevent ContextNotActiveException (cherry picked from commit da65125)
Check for an active RequestContext before accessing ResteasyReactiveLocaleResolver#currentVertxRequest to prevent ContextNotActiveException (cherry picked from commit da65125)
Check for an active RequestContext before accessing ResteasyReactiveLocaleResolver#currentVertxRequest to prevent ContextNotActiveException (cherry picked from commit da65125)
Describe the bug
https://stackoverflow.com/questions/75535327/hibernate-validator-for-smallrye-quarkus-configmapping-throwing-exception-and-n
I faced the same problem yesterday; the problem is in io.quarkus.hibernate.validator.runtime.locale.ResteasyReactiveLocaleResolver.resolve(line 18) because a @RequestContext object is requested and request scope is not active.
Expected behavior
Application should not start but with the right validation error message
Actual behavior
How to Reproduce?
https://github.com/luca-bassoricci/code-with-quarkus
build with latest version but also fails with older versions
Output of
uname -a
orver
Windows 11
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
Removing
quarkus-resteasy-reactive
will solve the problem.I had the same problem in backend code which interacts with some
@RestClient
s during validation of PanacheEntity just before persisting, but I am unable to write a reproducer.The text was updated successfully, but these errors were encountered: