{"record":{"id":"e0b890987e1b7f19","repo":"quarkusio/quarkus","slug":"java-lang-runtimeexception","errorCode":null,"errorMessage":"java.lang.RuntimeException","messagePattern":"java\\.lang\\.RuntimeException","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/IDELauncherImpl.java","lineNumber":85,"sourceCode":"                    }\n                }\n            } else {\n                builder.setApplicationRoot(classesDir)\n                        .setProjectRoot(projectDir);\n\n                final BootstrapMavenContext mvnCtx = new BootstrapMavenContext(\n                        BootstrapMavenContext.config().setCurrentProject(projectDir.toString()));\n\n                final MavenArtifactResolver mvnResolver = new MavenArtifactResolver(mvnCtx);\n                builder.setMavenArtifactResolver(mvnResolver);\n            }\n\n            final CuratedApplication curatedApp = builder.build().bootstrap();\n            final Object appInstance = curatedApp.runInAugmentClassLoader(\"io.quarkus.deployment.dev.IDEDevModeMain\", context);\n            return new IDELauncherImpl(curatedApp,\n                    appInstance == null ? null : appInstance instanceof Closeable ? (Closeable) appInstance : null);\n        } catch (Exception e) {\n            throw new RuntimeException(e);\n        }\n    }\n\n    private static PathsCollection collectOutputDirs(ArtifactSources mainSources) {\n        PathsCollection.Builder outputDirs = PathsCollection.builder();\n        collectOutputDirs(mainSources.getSourceDirs(), outputDirs);\n        collectOutputDirs(mainSources.getResourceDirs(), outputDirs);\n        return outputDirs.build();\n    }\n\n    private static void collectOutputDirs(Collection<SourceDir> sourceDirs, PathsCollection.Builder applicationRoots) {\n        for (SourceDir sourceDir : sourceDirs) {\n            if (!applicationRoots.contains(sourceDir.getOutputDir()) && Files.exists(sourceDir.getOutputDir())) {\n                applicationRoots.add(sourceDir.getOutputDir());\n            }\n        }\n    }\n","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/IDELauncherImpl.java#L67-L103","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the full stack trace's cause chain — the root exception identifies the actual failure","Ensure the application's Quarkus dependencies match the version of the bootstrap/quarkus-core on the launch classpath","Verify the context map passed to launch contains the keys IDEDevModeMain expects","Run ./mvnw quarkus:dev on the command line to reproduce with clearer error output"],"exampleFix":"// before\n// opaque RuntimeException from IDE launch; cause hidden\n// after\n// inspect 'Caused by:' in the stack trace; align versions:\n<quarkus.platform.version>3.x.y</quarkus.platform.version> // same as bootstrap libraries","handlingStrategy":"try-catch","validationCode":"// check launch context essentials before launch\nif (classesDir == null || !Files.exists(classesDir)) throw new IllegalStateException(\"bad classesDir\");","typeGuard":null,"tryCatchPattern":"try {\n    IDELauncherImpl.launch(classesDir, ctx);\n} catch (RuntimeException e) {\n    Throwable cause = e.getCause();\n    while (cause.getCause() != null) cause = cause.getCause(); // root cause\n    cause.printStackTrace();\n}","preventionTips":["Align quarkus platform/bootstrap versions with the app's Quarkus version","Reproduce with ./mvnw quarkus:dev for clearer diagnostics","Validate the context map keys expected by IDEDevModeMain","Avoid mixed quarkus-core/quarkus-deployment artifacts on the launch classpath"],"tags":["ide","dev-mode","bootstrap","wrapped-exception"],"backgroundTag":"wrapped-runtime-exception","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"}