{"record":{"id":"e327cdd15a783429","repo":"quarkusio/quarkus","slug":"failed-to-create-jbang-project-message","errorCode":null,"errorMessage":"Failed to create JBang project: ${message}","messagePattern":"Failed to create JBang project: (.+?)","errorType":"exception","errorClass":"QuarkusCommandException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateJBangProjectCommandHandler.java","lineNumber":73,"sourceCode":"                            firstBom.getVersion());\n        }\n        final QuarkusJBangCodestartProjectInput input = builder.build();\n\n        final Path projectDir = invocation.getQuarkusProject().getProjectDirPath();\n        try {\n            invocation.log().info(\"-----------\");\n            if (!extensionsToAdd.isEmpty()) {\n                invocation.log().info(\"selected extensions: \\n\"\n                        + extensionsToAdd.stream().map(e -> \"- \" + e.getGroupId() + \":\" + e.getArtifactId() + \"\\n\")\n                                .collect(Collectors.joining()));\n            }\n            getCatalog(invocation.getQuarkusProject()).createProject(input).generate(projectDir);\n            invocation.log()\n                    .info(\"\\n-----------\\n\" + MessageIcons.SUCCESS_ICON + \" \"\n                            + \" jbang project has been successfully generated in:\\n--> \"\n                            + invocation.getQuarkusProject().getProjectDirPath().toString() + \"\\n-----------\");\n        } catch (IOException e) {\n            throw new QuarkusCommandException(\"Failed to create JBang project: \" + e.getMessage(), e);\n        }\n        return QuarkusCommandOutcome.success();\n    }\n\n    private QuarkusJBangCodestartCatalog getCatalog(QuarkusProject project) throws IOException {\n        return QuarkusJBangCodestartCatalog.fromResourceLoaders(project.getCodestartResourceLoaders());\n    }\n}\n","sourceCodeStart":55,"sourceCodeEnd":82,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateJBangProjectCommandHandler.java#L55-L82","documentation":"CreateJBangProjectCommandHandler.execute wraps IOException from generating the JBang project (codestart catalog load or project generate) into QuarkusCommandException('Failed to create JBang project: ' + e.getMessage()).","triggerScenarios":"Executing the JBang project creation when QuarkusJBangCodestartCatalog.fromResourceLoaders or codestartCatalog.createProject(...).generate(projectDir) throws IOException.","commonSituations":"Target project dir unwritable or partially exists; codestart resources missing from classpath (corrupted installation); disk full.","solutions":["Inspect the embedded message/cause for the exact IO failure","Ensure the target directory is writable and does not conflict with existing files","Reinstall/upgrade the Quarkus CLI if codestart resources are missing","Clean any partial output directory and rerun"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"Path out = invocation.getQuarkusProject().getProjectDirPath();\nif (Files.exists(out) && !Files.isWritable(out)) throw new IllegalStateException(\"Target not writable: \" + out);","typeGuard":null,"tryCatchPattern":"try { handler.execute(invocation); } catch (QuarkusCommandException e) { log.error(\"JBang project generation failed: \" + e.getMessage(), e.getCause()); }","preventionTips":["Generate into an empty, writable directory","Reinstall the CLI if codestart resources appear missing","Check disk space before scaffolding","Avoid network/AV interference with file writes"],"tags":["io","jbang","scaffolding"],"backgroundTag":"project-generation-io-error","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}