-
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
Quarkus exits without showing thrown exception when using -H:ThrowMissingRegistrationErrors=
#42084
Comments
-H:ThrowMissingRegistrationErrors=
-H:ThrowMissingRegistrationErrors=
Prevent the usage of the logger when the application has not started regardless of the cause since it's most likely not configured yet. Closes quarkusio#42084
Prevent the usage of the logger when the application has not started regardless of the cause since it's most likely not configured yet. Closes quarkusio#42084
Prevent the usage of the logger when the application has not started regardless of the cause since it's most likely not configured yet. Closes quarkusio#42084
Prevent the usage of the logger when the application has not started regardless of the cause since it's most likely not configured yet. Closes quarkusio#42084
Note that on MacOS the reproducer doesn't work exactly the same as the application fails due to an NCDFE
Inspecting the above stack trace I see that the NCDFE is thrown when trying to log an error triggered in
patching the code to print the stacktrace on stderr before trying to log the error shows the following stacktrace:
not sure why this is not triggered on Linux... |
I created #42810 to resolve the macOS issue but that requires graalvm/graalvm-community-jdk21u#9 being merged and released in the next Mandrel 23.1.x release to work. With Mandrel 24.0.x (that includes #42810) and #42810 the issue is not reproducible on macOS |
Describe the bug
$title
Relates to #41995
Expected behavior
When a
MissingRegistrationError
exception is thrown it should be shown on the console output (or logs), e.g. something like:Actual behavior
The native executable exits without printing anything.
How to Reproduce?
Output of
uname -a
orver
Fedora 40
Output of
java -version
21.0.4+7
Mandrel or GraalVM version (if different from Java)
Mandrel-23.1.4.0-Final
Quarkus version or git rev
e1e133f
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Additional information
It looks like this is related to how Quarkus handles exceptions in
quarkus/core/runtime/src/main/java/io/quarkus/runtime/ApplicationLifecycleManager.java
Line 197 in e1987aa
The exception is thrown too early and Quarkus has not yet set up logging. The exception however is not
ConfigurationException
orConfigValidationException
so it's not handled specially and results in the observed behavior.I believe there should be a way to check if the configuration is completed (or at least if logging is properly setup) regardless of the exception type so that Quarkus could still show exceptions, not matching the ones above, thrown during the configuration stage.
The text was updated successfully, but these errors were encountered: