{"record":{"id":"5d8184a58034daad","repo":"quarkusio/quarkus","slug":"failed-to-run-5d8184","errorCode":null,"errorMessage":"Failed to run","messagePattern":"Failed to run","errorType":"exception","errorClass":"MojoFailureException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java","lineNumber":594,"sourceCode":"                        // stop the runner before we build the new one as the debug port being free\n                        // is tested when building the runner\n                        runner.stop();\n\n                        final DevModeRunner newRunner;\n                        try {\n                            bootstrapId = handleAutoCompile(changedPoms);\n                            newRunner = new DevModeRunner(runner.commandLine.getDebugPort(), bootstrapId, pomFiles.keySet());\n                        } catch (Exception e) {\n                            getLog().info(\"Could not load changedPoms pom.xml file, changes not applied\", e);\n                            continue;\n                        }\n                        newRunner.run();\n                        runner = newRunner;\n                    }\n                }\n            }\n        } catch (Exception e) {\n            throw new MojoFailureException(\"Failed to run\", e);\n        }\n    }\n\n    private List<String> collectChangeFilesFrom(Map<Path, Long> paths) throws IOException {\n        // unless it's a git or some other command, there won't be many files modified in 100 milliseconds\n        List<String> changedFiles = new ArrayList<>(1);\n        for (Map.Entry<Path, Long> e : paths.entrySet()) {\n            long t = Files.getLastModifiedTime(e.getKey()).toMillis();\n            if (t > e.getValue()) {\n                changedFiles.add(e.getKey().toString());\n                paths.put(e.getKey(), t);\n            }\n        }\n        return changedFiles;\n    }\n\n    private void logChanges(List<String> changedFiles) {\n        final StringBuilder sb = new StringBuilder().append(\"Restarting dev mode following changes in \");","sourceCodeStart":576,"sourceCodeEnd":612,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java#L576-L612","documentation":"DevMojo.execute wraps the entire dev-mode lifecycle (starting the runner, restarting on file changes, terminal handling) in a try block and converts any Exception into MojoFailureException 'Failed to run' with the original cause attached. It is a generic wrapper; the real cause is the chained exception printed below it.","triggerScenarios":"Any exception thrown while running or restarting the dev-mode runner: failure to launch the JVM, errors during hot-reload handling, IO problems watching files, or the MojoExecutionException from a failed dev process propagating up.","commonSituations":"Application crash during dev session (see root cause); file watcher failures on network drives; exception during runner restart after a POM change; JDK incompatibility when spawning the dev process.","solutions":["Read the 'Caused by:' section of the stack trace — it holds the actual failure.","Fix the underlying cause (config error, compilation failure, missing dependency) rather than this wrapper.","Clean and rebuild (mvn clean install -DskipTests) if state from a previous run is corrupt.","Update the Quarkus Maven plugin and Quarkus versions to matching, recent releases if the crash is a plugin bug."],"exampleFix":"// diagnose\nmvn quarkus:dev -e  # inspect 'Caused by:'\n// common fix\nclean broken target state\nmvn clean install -DskipTests && mvn quarkus:dev","handlingStrategy":"try-catch","validationCode":"// verify a clean build state first\nmvn clean install -DskipTests","typeGuard":null,"tryCatchPattern":"try {\n    runDevMode();\n} catch (MojoFailureException e) {\n    // this message is generic; always surface the root cause\n    Throwable root = e;\n    while (root.getCause() != null) root = root.getCause();\n    log.error(\"Dev mode failed: \" + root.getMessage(), root);\n}","preventionTips":["Always diagnose the chained 'Caused by' — this wrapper hides the real error.","Clean target/ when dev-mode state looks corrupt.","Keep the Quarkus plugin and platform versions aligned.","Run with -e for full stack traces."],"tags":["maven","dev-mode","quarkus"],"backgroundTag":"dev-mode-startup-failed","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"}