Skip to content
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

Show exception cause during logging filter initialization #43051

Closed
mabartos opened this issue Sep 5, 2024 · 1 comment · Fixed by #43052
Closed

Show exception cause during logging filter initialization #43051

mabartos opened this issue Sep 5, 2024 · 1 comment · Fixed by #43052
Labels
area/logging kind/enhancement New feature or request
Milestone

Comments

@mabartos
Copy link
Contributor

mabartos commented Sep 5, 2024

Description

When there is some exception thrown during the logging Filter initialization, the exception cause is not properly propagated, and users do not know what exactly happened.

It'd be great to see what nested exception caused the failure of the initialization.

ERROR: Failed to start server in (development) mode
Error details:
java.lang.RuntimeException: Unable to create instance of Logging Filter 'org.keycloak.quarkus.runtime.configuration.filters.SyslogLogLevelFilter'
        at io.quarkus.runtime.logging.LoggingSetupRecorder$4.accept(LoggingSetupRecorder.java:272)
        at io.quarkus.runtime.logging.LoggingSetupRecorder$4.accept(LoggingSetupRecorder.java:266)
        at java.base/java.util.HashMap.forEach(HashMap.java:1429)
        at io.quarkus.runtime.logging.LoggingSetupRecorder.createNamedFilters(LoggingSetupRecorder.java:266)
        at io.quarkus.runtime.logging.LoggingSetupRecorder.initializeLogging(LoggingSetupRecorder.java:141)
        at io.quarkus.deployment.steps.LoggingResourceProcessor$setupLoggingRuntimeInit2024815463.deploy_0(Unknown Source)
        at io.quarkus.deployment.steps.LoggingResourceProcessor$setupLoggingRuntimeInit2024815463.deploy(Unknown Source)
        at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
        at io.quarkus.runtime.Application.start(Application.java:101)
        at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:119)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
        at org.keycloak.quarkus.runtime.KeycloakMain.start(KeycloakMain.java:141)
        at org.keycloak.quarkus.runtime.cli.command.AbstractStartCommand.run(AbstractStartCommand.java:42)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2030)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
        at picocli.CommandLine.execute(CommandLine.java:2174)
        at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:138)
        at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:101)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:62)
        at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33)
Exception in thread "Shutdown thread" java.lang.NullPointerException: Cannot invoke "io.quarkus.runtime.Application.isStarted()" because "app" is null
        at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:455)

@mabartos mabartos added the kind/enhancement New feature or request label Sep 5, 2024
mabartos added a commit to mabartos/quarkus that referenced this issue Sep 5, 2024
Closes quarkusio#43051

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Sep 5, 2024
@gsmet gsmet modified the milestones: 3.16 - main, 3.14.3 Sep 6, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 6, 2024
Closes quarkusio#43051

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
(cherry picked from commit 6c4eb26)
gsmet pushed a commit to gsmet/quarkus that referenced this issue Sep 6, 2024
Closes quarkusio#43051

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
(cherry picked from commit 6c4eb26)
danielsoro pushed a commit to danielsoro/quarkus that referenced this issue Sep 20, 2024
Closes quarkusio#43051

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@gsmet @geoand @mabartos and others