quarkusio/quarkus · critical · MojoExecutionException
Failed to bootstrap Quarkus application
Error message
Failed to bootstrap Quarkus application
What it means
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.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/TrackConfigChangesMojo.java:159
final List<Path> deps = new ArrayList<>();
for (var d : curatedApplication.getApplicationModel().getDependencies(DependencyFlags.DEPLOYMENT_CP)) {
for (Path resolvedPath : d.getResolvedPaths()) {
deps.add(resolvedPath.toAbsolutePath());
}
}
Collections.sort(deps);
final Path targetFile = getOutputFile(dependenciesFile, launchMode.getDefaultProfile(),
"-dependencies.txt");
Files.createDirectories(targetFile.getParent());
try (BufferedWriter writer = Files.newBufferedWriter(targetFile)) {
for (var dep : deps) {
writer.write(dep.toString());
writer.newLine();
}
}
}
} catch (Exception any) {
throw new MojoExecutionException("Failed to bootstrap Quarkus application", any);
} finally {
if (clearNativeEnabledSystemProperty) {
System.clearProperty("quarkus.native.enabled");
}
Thread.currentThread().setContextClassLoader(originalCl);
if (deploymentClassLoader != null) {
deploymentClassLoader.close();
}
}
}
private Path resolvePreviousBuildConfigDump(LaunchMode launchMode) {
final Path previousBuildConfigDump = this.recordedBuildConfigFile == null ? null
: Path.of(this.recordedBuildConfigFile);
if (previousBuildConfigDump == null) {
return recordedBuildConfigDirectory.toPath()
.resolve("quarkus-" + launchMode.getDefaultProfile() + "-config-dump");
}View on GitHub (pinned to e1c734241f)
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)
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-flight: verify dependencies resolve and JDK is compatible before dev: mvn dependency:resolve java -version # Quarkus 3.x needs Java 11+ (17+ recommended)
Try / catch
catch (MojoExecutionException e) {
Throwable root = e;
while (root.getCause() != null) root = root.getCause();
log.error("Bootstrap failed, root cause: {}", root.getMessage(), root);
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Failed to bootstrap the application
- Unrecognized option for quarkus.bootstrap.misaligned-platfor
- Unable to parse pom file: ${pom}
- Quarkus already running
- Quarkus manual bootstrap failed
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/45288ad5a2c4a812.
Report an issue: GitHub.