{"record":{"id":"9ff2a3b31dc9ff07","repo":"quarkusio/quarkus","slug":"cannot-launch-a-runtime-application-with-normal-la","errorCode":null,"errorMessage":"Cannot launch a runtime application with NORMAL launch mode","messagePattern":"Cannot launch a runtime application with NORMAL launch mode","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/runner/bootstrap/AugmentActionImpl.java","lineNumber":343,"sourceCode":"            // least priority\n            if (type.equals(\"appCDS\")) {\n                return 0;\n            }\n\n            // default\n            return 10;\n        }\n    }\n\n    private static String artifactPathForResultMetadata(BuildSystemTargetBuildItem outputTargetBuildItem,\n            ArtifactResultBuildItem artifactResultBuildItem) {\n        return outputTargetBuildItem.getOutputDirectory().relativize(artifactResultBuildItem.getPath()).toString();\n    }\n\n    @Override\n    public StartupActionImpl createInitialRuntimeApplication() {\n        if (launchMode == LaunchMode.NORMAL) {\n            throw new IllegalStateException(\"Cannot launch a runtime application with NORMAL launch mode\");\n        }\n        try (QuarkusClassLoader classLoader = curatedApplication.createDeploymentClassLoader()) {\n            @SuppressWarnings(\"unchecked\")\n            BuildResult result = runAugment(true, Collections.emptySet(), null, classLoader, NON_NORMAL_MODE_OUTPUTS);\n            return new StartupActionImpl(curatedApplication, result);\n        }\n    }\n\n    @Override\n    public StartupActionImpl reloadExistingApplication(boolean hasStartedSuccessfully, Set<String> changedResources,\n            ClassChangeInformation classChangeInformation) {\n        if (launchMode != LaunchMode.DEVELOPMENT) {\n            throw new IllegalStateException(\"Only application with launch mode DEVELOPMENT can restart\");\n        }\n\n        try (QuarkusClassLoader classLoader = curatedApplication.createDeploymentClassLoader()) {\n            @SuppressWarnings(\"unchecked\")\n            BuildResult result = runAugment(!hasStartedSuccessfully, changedResources, classChangeInformation, classLoader,","sourceCodeStart":325,"sourceCodeEnd":361,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/runner/bootstrap/AugmentActionImpl.java#L325-L361","documentation":"AugmentActionImpl.createInitialRuntimeApplication() prepares a live, restartable runtime application for dev tooling. It is only valid in non-NORMAL launch modes; in NORMAL (production) mode the framework refuses so production augmentation is never misused to launch a mutable runtime app.","triggerScenarios":"Calling createInitialRuntimeApplication() (or creating a CuratedApplication and its AugmentAction) when launchMode is LaunchMode.NORMAL, e.g. invoking dev-mode bootstrap APIs from production code or tests using the default launch mode.","commonSituations":"Dev tools or test harnesses constructing AugmentAction manually without setting LaunchMode.DEVELOPMENT/TEST; embedding Quarkus bootstrapping in application code that runs in production mode.","solutions":["Create the CuratedApplication/AugmentAction with LaunchMode.DEVELOPMENT or TEST","Use the standard production entry point (io.quarkus.runtime.Quarkus.run) instead of dev bootstrap APIs","Check the launch-mode supplier wired into your bootstrap code"],"exampleFix":"// before\nCuratedApplication app = curator.bootstrap();\nAugmentAction action = app.createAugmentAction(); // launchMode defaults to NORMAL\n// after\nCuratedApplication app = curator.bootstrap();\nAugmentAction action = app.createAugmentAction(LaunchMode.DEVELOPMENT);","handlingStrategy":"validation","validationCode":"if (launchMode == LaunchMode.NORMAL) {\n    throw new IllegalArgumentException(\"createInitialRuntimeApplication requires DEVELOPMENT or TEST mode\");\n}","typeGuard":null,"tryCatchPattern":"try { action.createInitialRuntimeApplication(); } catch (IllegalStateException e) { if (e.getMessage().contains(\"NORMAL launch mode\")) { /* recreate action in dev/test mode */ } else { throw e; } }","preventionTips":["Always pass an explicit LaunchMode when bootstrapping CuratedApplication","Never call dev bootstrap APIs from production entry points","Use Quarkus.run() for production launches"],"tags":["quarkus","dev-mode","launch-mode"],"backgroundTag":"wrong-launch-mode","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"}