{"record":{"id":"04d15dd083b30553","repo":"quarkusio/quarkus","slug":"failed-to-run-application","errorCode":null,"errorMessage":"Failed to run application","messagePattern":"Failed to run application","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusRun.java","lineNumber":206,"sourceCode":"                                } finally {\n                                    Runtime.getRuntime().removeShutdownHook(hook);\n                                }\n                            })\n                            .run();\n                }\n            },\n                    RunCommandActionResultBuildItem.class.getName(), DevServicesLauncherConfigResultBuildItem.class.getName());\n            if (target != null && !exists.get()) {\n                getLogger().error(\"quarkus.run.target \" + target + \" is not found\");\n                return;\n            }\n            if (tooMany.get() != null) {\n                getLogger().error(\n                        \"Too many installed extensions support quarkus:run.  Use -Dquarkus.run.target=<target> to choose\");\n                getLogger().error(\"Extensions: \" + tooMany.get());\n            }\n        } catch (BootstrapException e) {\n            throw new GradleException(\"Failed to run application\", e);\n        }\n    }\n\n}\n","sourceCodeStart":188,"sourceCodeEnd":211,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusRun.java#L188-L211","documentation":"QuarkusRun.runQuarkus bootstraps the application via QuarkusBootstrap. If bootstrap fails with a BootstrapException, it wraps it as GradleException(\"Failed to run application\"). Note that the 'too many run targets' case is only logged, not thrown; this error means application bootstrap itself failed.","triggerScenarios":"Running ./gradlew quarkusRun when the application cannot be bootstrapped: missing/invalid main class, classpath augmentation failure, bad configuration values, or deployment-time errors during augmentation.","commonSituations":"quarkus.package.main-class pointing to a nonexistent class; configuration property errors surfaced at bootstrap; corrupted build/classes outputs; incompatible extension versions on the classpath.","solutions":["Run with --stacktrace/--info to see the wrapped BootstrapException cause and fix the root problem.","Verify application config (application.properties) and quarkus.package.main-class are valid.","Clean the build (./gradlew clean quarkusRun) to remove stale augmented outputs, then retry."],"exampleFix":"// before (application.properties)\nquarkus.package.main-class=com.example.Mis spelled.Main\n\n// after\nquarkus.package.main-class=com.example.Main","handlingStrategy":"try-catch","validationCode":"// validate main class and basic config before running\ndef mainClass = providers.gradleProperty('quarkus.package.main-class').orElse(providers.property('quarkus.package.run-module')).getOrElse('')\nassert mainClass.isEmpty() || classes.findByFqn(mainClass as String) != null : 'quarkus.package.main-class not found on classpath'","typeGuard":null,"tryCatchPattern":"try { ./gradlew quarkusRun } catch (GradleException e) { if (e.message == 'Failed to run application' && e.cause instanceof BootstrapException) { /* inspect e.cause.cause for the real bootstrap failure */ } }","preventionTips":["Validate application.properties values; most bootstrap failures are config errors.","Run ./gradlew clean before quarkusRun after dependency/version changes.","Use ./gradlew build first to catch augmentation errors with clearer diagnostics."],"tags":["gradle","run","bootstrap","configuration"],"backgroundTag":"application-bootstrap-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}