quarkusio/quarkus · error · RuntimeException

java.lang.RuntimeException

Error message

java.lang.RuntimeException

What it means

IDELauncherImpl.launch wraps any Exception from bootstrapping the curated application or running IDEDevModeMain in a RuntimeException via `throw new RuntimeException(e)`. The cause can be anything during bootstrap: curation failures, classloading errors, or failures inside the dev-mode main, so the nested cause must be inspected.

Source

Thrown at independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/IDELauncherImpl.java:85

                    }
                }
            } else {
                builder.setApplicationRoot(classesDir)
                        .setProjectRoot(projectDir);

                final BootstrapMavenContext mvnCtx = new BootstrapMavenContext(
                        BootstrapMavenContext.config().setCurrentProject(projectDir.toString()));

                final MavenArtifactResolver mvnResolver = new MavenArtifactResolver(mvnCtx);
                builder.setMavenArtifactResolver(mvnResolver);
            }

            final CuratedApplication curatedApp = builder.build().bootstrap();
            final Object appInstance = curatedApp.runInAugmentClassLoader("io.quarkus.deployment.dev.IDEDevModeMain", context);
            return new IDELauncherImpl(curatedApp,
                    appInstance == null ? null : appInstance instanceof Closeable ? (Closeable) appInstance : null);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    private static PathsCollection collectOutputDirs(ArtifactSources mainSources) {
        PathsCollection.Builder outputDirs = PathsCollection.builder();
        collectOutputDirs(mainSources.getSourceDirs(), outputDirs);
        collectOutputDirs(mainSources.getResourceDirs(), outputDirs);
        return outputDirs.build();
    }

    private static void collectOutputDirs(Collection<SourceDir> sourceDirs, PathsCollection.Builder applicationRoots) {
        for (SourceDir sourceDir : sourceDirs) {
            if (!applicationRoots.contains(sourceDir.getOutputDir()) && Files.exists(sourceDir.getOutputDir())) {
                applicationRoots.add(sourceDir.getOutputDir());
            }
        }
    }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Read the full stack trace's cause chain — the root exception identifies the actual failure
  2. Ensure the application's Quarkus dependencies match the version of the bootstrap/quarkus-core on the launch classpath
  3. Verify the context map passed to launch contains the keys IDEDevModeMain expects
  4. Run ./mvnw quarkus:dev on the command line to reproduce with clearer error output

Example fix

// before
// opaque RuntimeException from IDE launch; cause hidden
// after
// inspect 'Caused by:' in the stack trace; align versions:
<quarkus.platform.version>3.x.y</quarkus.platform.version> // same as bootstrap libraries
Defensive patterns

Strategy: try-catch

Validate before calling

// check launch context essentials before launch
if (classesDir == null || !Files.exists(classesDir)) throw new IllegalStateException("bad classesDir");

Try / catch

try {
    IDELauncherImpl.launch(classesDir, ctx);
} catch (RuntimeException e) {
    Throwable cause = e.getCause();
    while (cause.getCause() != null) cause = cause.getCause(); // root cause
    cause.printStackTrace();
}

Prevention

When it happens

Trigger: builder.build().bootstrap() fails (bad configuration, unresolvable dependencies) or curatedApp.runInAugmentClassLoader("io.quarkus.deployment.dev.IDEDevModeMain", context) throws — e.g. wrong context map entries, classpath isolation problems, or a deployment-time build step failure.

Common situations: Launching dev mode from an IDE with an inconsistent classpath, a Quarkus version mismatch between the bootstrap API and the application's Quarkus artifacts, missing system properties expected by IDEDevModeMain, or a broken application that fails augmentation.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/e0b890987e1b7f19. Report an issue: GitHub.