quarkusio/quarkus · error · QuarkusCommandException
Failed to create JBang project: ${message}
Error message
Failed to create JBang project: ${message} What it means
CreateJBangProjectCommandHandler.execute wraps IOException from generating the JBang project (codestart catalog load or project generate) into QuarkusCommandException('Failed to create JBang project: ' + e.getMessage()).
Source
Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateJBangProjectCommandHandler.java:73
firstBom.getVersion());
}
final QuarkusJBangCodestartProjectInput input = builder.build();
final Path projectDir = invocation.getQuarkusProject().getProjectDirPath();
try {
invocation.log().info("-----------");
if (!extensionsToAdd.isEmpty()) {
invocation.log().info("selected extensions: \n"
+ extensionsToAdd.stream().map(e -> "- " + e.getGroupId() + ":" + e.getArtifactId() + "\n")
.collect(Collectors.joining()));
}
getCatalog(invocation.getQuarkusProject()).createProject(input).generate(projectDir);
invocation.log()
.info("\n-----------\n" + MessageIcons.SUCCESS_ICON + " "
+ " jbang project has been successfully generated in:\n--> "
+ invocation.getQuarkusProject().getProjectDirPath().toString() + "\n-----------");
} catch (IOException e) {
throw new QuarkusCommandException("Failed to create JBang project: " + e.getMessage(), e);
}
return QuarkusCommandOutcome.success();
}
private QuarkusJBangCodestartCatalog getCatalog(QuarkusProject project) throws IOException {
return QuarkusJBangCodestartCatalog.fromResourceLoaders(project.getCodestartResourceLoaders());
}
}
View on GitHub (pinned to e1c734241f)
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
Defensive patterns
Strategy: try-catch
Validate before calling
Path out = invocation.getQuarkusProject().getProjectDirPath();
if (Files.exists(out) && !Files.isWritable(out)) throw new IllegalStateException("Target not writable: " + out); Try / catch
try { handler.execute(invocation); } catch (QuarkusCommandException e) { log.error("JBang project generation failed: " + e.getMessage(), e.getCause()); } Prevention
- 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
When it happens
Trigger: Executing the JBang project creation when QuarkusJBangCodestartCatalog.fromResourceLoaders or codestartCatalog.createProject(...).generate(projectDir) throws IOException.
Common situations: Target project dir unwritable or partially exists; codestart resources missing from classpath (corrupted installation); disk full.
Related errors
- Error while creating Quarkus extension: ${message}
- Failed to create project: ${message}
- Failed to open path tree with root %s
- Failed to read %s
- Failed to read resources from classpath
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/e327cdd15a783429.
Report an issue: GitHub.