spring-projects/spring-boot · error · ReportableException
No project type with id '{}' - check the service capabilitie
Error message
No project type with id '{}' - check the service capabilities (--list) What it means
Thrown by ProjectGenerationRequest.determineProjectType when --type is set but its id is absent from the server's project-type metadata. The metadata's projectTypes map is keyed by type id; a miss is fatal because the requested type cannot be honored.
Source
Thrown at cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerationRequest.java:368
if (this.language != null) {
builder.setParameter("language", this.language);
}
if (this.bootVersion != null) {
builder.setParameter("bootVersion", this.bootVersion);
}
return builder.build();
}
catch (URISyntaxException ex) {
throw new ReportableException("Invalid service URL (" + ex.getMessage() + ")");
}
}
protected ProjectType determineProjectType(InitializrServiceMetadata metadata) {
if (this.type != null) {
ProjectType result = metadata.getProjectTypes().get(this.type);
if (result == null) {
throw new ReportableException(
("No project type with id '" + this.type + "' - check the service capabilities (--list)"));
}
return result;
}
else if (isDetectType()) {
Map<String, ProjectType> types = new HashMap<>(metadata.getProjectTypes());
if (this.build != null) {
filter(types, "build", this.build);
}
if (this.format != null) {
filter(types, "format", this.format);
}
if (types.size() == 1) {
return types.values().iterator().next();
}
else if (types.isEmpty()) {
throw new ReportableException("No type found with build '" + this.build + "' and format '" + this.format
+ "' check the service capabilities (--list)");View on GitHub (pinned to 270dfe353f)
Solutions
- Run 'spring init --list' to see valid type ids
- Correct the --type value to match an advertised id
- Upgrade the CLI to match the server's available types
Example fix
// before $ spring init --type foobar // after $ spring init --type maven-project # per --list output
Defensive patterns
Strategy: validation
Validate before calling
// Resolve the type against metadata before requesting generation.
InitializrServiceMetadata md = service.loadMetadata(serviceUrl);
String type = request.getType();
if (type != null && !md.getProjectTypes().containsKey(type)) {
throw new IllegalArgumentException(
"Unknown type '" + type + "'. Valid: " + md.getProjectTypes().keySet());
} Try / catch
try {
request.determineProjectType(metadata);
} catch (ReportableException ex) {
if (ex.getMessage().startsWith("No project type with id")) {
Log.error("Run 'spring init --list' for valid type ids");
}
throw ex;
} Prevention
- Discover type ids with 'spring init --list' before specifying --type
- Treat type ids as server-specific; do not hard-code across services
- Re-check supported types after upgrading the Initializr server
When it happens
Trigger: Running 'spring init --type foo' where 'foo' is not among the server's advertised type ids.
Common situations: Typo in --type; the server version changed or removed a type; an outdated CLI assuming a type id that a newer server no longer exposes.
Related errors
- No type found with build '{}' and format '{}' check the serv
- Invalid service URL ({})
- Multiple types found with build '{}' and format '{}' use --t
- No project type is set and no default is defined. Check the
- Could not save the project, the server did not set a preferr
AI-assisted analysis of spring-projects/spring-boot@270dfe353f (2026-08-11).
Data as JSON: /api/errors/6293ae007331eef2.
Report an issue: GitHub.