From faa7022f056db0467310bd1937f1edfa0626eadc Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Thu, 21 Nov 2024 17:58:40 +0200 Subject: [PATCH] Catch MissingReflectionRegistrationErrors during start up Closes https://github.com/quarkusio/quarkus/issues/42084 --- .../java/io/quarkus/runtime/ApplicationLifecycleManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/runtime/src/main/java/io/quarkus/runtime/ApplicationLifecycleManager.java b/core/runtime/src/main/java/io/quarkus/runtime/ApplicationLifecycleManager.java index 75bf5410976c3..8abe82a75c43d 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/ApplicationLifecycleManager.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/ApplicationLifecycleManager.java @@ -17,6 +17,7 @@ import jakarta.enterprise.inject.spi.BeanManager; import jakarta.enterprise.inject.spi.CDI; +import org.graalvm.nativeimage.MissingReflectionRegistrationError; import org.jboss.logging.Logger; import org.jboss.logmanager.handlers.AsyncHandler; import org.wildfly.common.lock.Locks; @@ -199,7 +200,8 @@ public static void run(Application application, Class'."); } - } else if (rootCause instanceof ConfigurationException || rootCause instanceof ConfigValidationException) { + } else if (rootCause instanceof ConfigurationException || rootCause instanceof ConfigValidationException + || rootCause instanceof MissingReflectionRegistrationError) { System.err.println(rootCause.getMessage()); } else if (rootCause instanceof PreventFurtherStepsException && !StringUtil.isNullOrEmpty(rootCause.getMessage())) {