{"record":{"id":"b15c9df25d427e75","repo":"quarkusio/quarkus","slug":"quarkus-manual-start-cannot-proceed-as-warmup-did","errorCode":null,"errorMessage":"Quarkus manual start cannot proceed as warmup did not run","messagePattern":"Quarkus manual start cannot proceed as warmup did not run","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"core/runtime/src/main/java/io/quarkus/runtime/Quarkus.java","lineNumber":311,"sourceCode":"     * This method will call Application.start() and register shutdown hook\n     * It will fail if Quarkus.manualInitialize() has not been called.\n     *\n     *\n     */\n    public static void manualStart() {\n        int tmpState = manualState;\n        if (tmpState == MANUAL_FAILURE)\n            throw new IllegalStateException(\"Quarkus failed to start up\");\n        if (tmpState >= MANUAL_STARTING)\n            return;\n        synchronized (manualLock) {\n            tmpState = manualState;\n            if (tmpState == MANUAL_FAILURE)\n                throw new RuntimeException(\"Quarkus manual bootstrap failed\");\n            if (tmpState >= MANUAL_STARTING)\n                return;\n            if (tmpState != MANUAL_INITIALIZED)\n                throw new IllegalStateException(\"Quarkus manual start cannot proceed as warmup did not run\");\n            manualState = MANUAL_STARTING;\n        }\n        try {\n            String[] args = {};\n            Runtime.getRuntime().addShutdownHook(new Thread() {\n                @Override\n                public void run() {\n                    ShutdownRecorder.runShutdown();\n                    manualApp.doStop();\n                }\n            });\n            manualApp.doStart(args);\n        } catch (RuntimeException e) {\n            manualState = MANUAL_FAILURE;\n            throw e;\n        }\n        manualState = MANUAL_STARTED;\n    }","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/runtime/src/main/java/io/quarkus/runtime/Quarkus.java#L293-L329","documentation":"Thrown by Quarkus.manualStart() as IllegalStateException when the manual state is not MANUAL_INITIALIZED, i.e. manualInitialize() never completed successfully (or was never called, or already advanced/failed). manualStart() requires the warmup performed by manualInitialize().","triggerScenarios":"Calling Quarkus.manualStart() without a preceding successful Quarkus.manualInitialize(); calling manualStart() twice (state already past MANUAL_STARTING returns early, but failed/partial init leaves other states); calling start while init is still in progress.","commonSituations":"Serverless glue code that calls manualStart() in a different code path from manualInitialize(); reordering the two calls during refactoring.","solutions":["Call Quarkus.manualInitialize() to completion before Quarkus.manualStart().","Call each method exactly once, in order, from the same initialization path.","If init already failed, fix that failure instead of forcing start."],"exampleFix":"// before\nQuarkus.manualStart(); // warmup never ran\n// after\nQuarkus.manualInitialize();\nQuarkus.manualStart();","handlingStrategy":"validation","validationCode":"// enforce order in your own entry point:\npublic static void bootstrap() { Quarkus.manualInitialize(); Quarkus.manualStart(); }","typeGuard":null,"tryCatchPattern":"try { Quarkus.manualStart(); } catch (IllegalStateException e) { log.error(\"call manualInitialize() first\", e); throw e; }","preventionTips":["Always call manualInitialize() before manualStart()","Call each exactly once","Keep both calls in the same initialization code path"],"tags":["quarkus","lifecycle","call-order","state-machine"],"backgroundTag":"quarkus-lifecycle-call-order","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"}