{"record":{"id":"45288ad5a2c4a812","repo":"quarkusio/quarkus","slug":"failed-to-bootstrap-quarkus-application","errorCode":null,"errorMessage":"Failed to bootstrap Quarkus application","messagePattern":"Failed to bootstrap Quarkus application","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"critical","filePath":"devtools/maven/src/main/java/io/quarkus/maven/TrackConfigChangesMojo.java","lineNumber":159,"sourceCode":"                final List<Path> deps = new ArrayList<>();\n                for (var d : curatedApplication.getApplicationModel().getDependencies(DependencyFlags.DEPLOYMENT_CP)) {\n                    for (Path resolvedPath : d.getResolvedPaths()) {\n                        deps.add(resolvedPath.toAbsolutePath());\n                    }\n                }\n                Collections.sort(deps);\n                final Path targetFile = getOutputFile(dependenciesFile, launchMode.getDefaultProfile(),\n                        \"-dependencies.txt\");\n                Files.createDirectories(targetFile.getParent());\n                try (BufferedWriter writer = Files.newBufferedWriter(targetFile)) {\n                    for (var dep : deps) {\n                        writer.write(dep.toString());\n                        writer.newLine();\n                    }\n                }\n            }\n        } catch (Exception any) {\n            throw new MojoExecutionException(\"Failed to bootstrap Quarkus application\", any);\n        } finally {\n            if (clearNativeEnabledSystemProperty) {\n                System.clearProperty(\"quarkus.native.enabled\");\n            }\n            Thread.currentThread().setContextClassLoader(originalCl);\n            if (deploymentClassLoader != null) {\n                deploymentClassLoader.close();\n            }\n        }\n    }\n\n    private Path resolvePreviousBuildConfigDump(LaunchMode launchMode) {\n        final Path previousBuildConfigDump = this.recordedBuildConfigFile == null ? null\n                : Path.of(this.recordedBuildConfigFile);\n        if (previousBuildConfigDump == null) {\n            return recordedBuildConfigDirectory.toPath()\n                    .resolve(\"quarkus-\" + launchMode.getDefaultProfile() + \"-config-dump\");\n        }","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/TrackConfigChangesMojo.java#L141-L177","documentation":"TrackConfigChangesMojo.doExecute bootstraps the Quarkus application (creating the curated application, deployment classloader, and collecting dependencies) and wraps the entire body in a catch(Exception) that rethrows as MojoExecutionException 'Failed to bootstrap Quarkus application'. This is the generic gate: anything failing while starting the application for dev-mode config tracking lands here.","triggerScenarios":"Any exception during doExecute: CuratedApplication creation failure (unresolvable dependencies), deployment classloader creation error, missing quarkus platform, IO errors writing the dependency/config files, or a runtime exception from bootstrap steps.","commonSituations":"Unresolvable Maven dependencies (offline mode, missing repo credentials); incompatible extension versions vs the platform BOM; corrupt local repository cache (~/.m2); Java version mismatch with the Quarkus version.","solutions":["Read the 'Caused by' chain of this MojoExecutionException for the real cause","Run `mvn -U dependency:resolve` to refresh/verify dependency resolution","Clear suspicious ~/.m2 artifacts (delete the group dir) and retry","Verify the Quarkus platform version and JDK version are compatible (e.g. Quarkus 3.x requires Java 11+, check extension BOM alignment)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-flight: verify dependencies resolve and JDK is compatible before dev:\nmvn dependency:resolve\njava -version  # Quarkus 3.x needs Java 11+ (17+ recommended)","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) {\n  Throwable root = e;\n  while (root.getCause() != null) root = root.getCause();\n  log.error(\"Bootstrap failed, root cause: {}\", root.getMessage(), root);\n}","preventionTips":["Keep quarkus.platform.version aligned across all modules","Avoid offline mode (-o) unless the whole dependency tree is cached","Delete stale ~/.m2 artifacts after failed downloads","Match the JDK to the Quarkus version's requirements"],"tags":["maven","quarkus","bootstrap"],"backgroundTag":"quarkus-bootstrap-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}