spring-projects/spring-boot · error · ReportableException

No type found with build '{}' and format '{}' check the serv

Error message

No type found with build '{}' and format '{}' check the service capabilities (--list)

What it means

Thrown by ProjectGenerationRequest.determineProjectType in detect-type mode (no --type) after filtering the server's type map by build and format yields zero matches. The build+format pair is not satisfiable by any advertised type.

Source

Thrown at cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerationRequest.java:385

			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)");
			}
			else {
				throw new ReportableException("Multiple types found with build '" + this.build + "' and format '"
						+ this.format + "' use --type with a more specific value " + types.keySet());
			}
		}
		else {
			ProjectType defaultType = metadata.getDefaultType();
			if (defaultType == null) {
				throw new ReportableException(("No project type is set and no default is defined. "
						+ "Check the service capabilities (--list)"));
			}
			return defaultType;
		}
	}

	/**

View on GitHub (pinned to 270dfe353f)

Solutions

  1. Run 'spring init --list' to see supported build/format combinations
  2. Set --type explicitly to a supported id
  3. Adjust --build and --format to a supported pair

Example fix

// before
$ spring init --build gradle --format unknown
// after
$ spring init --build gradle  # omit the unsupported format
Defensive patterns

Strategy: validation

Validate before calling

// In detect mode, pre-filter types to confirm the build/format pair resolves.
InitializrServiceMetadata md = service.loadMetadata(serviceUrl);
java.util.Map<String, ProjectType> candidates = new java.util.HashMap<>(md.getProjectTypes());
if (request.getBuild() != null) filter(candidates, "build", request.getBuild());
if (request.getFormat() != null) filter(candidates, "format", request.getFormat());
if (candidates.isEmpty()) {
    throw new IllegalArgumentException(
        "No type matches build=" + request.getBuild() + ", format=" + request.getFormat()
        + ". Run --list.");
}

Try / catch

try {
    request.determineProjectType(metadata);
} catch (ReportableException ex) {
    if (ex.getMessage().startsWith("No type found with build")) {
        Log.error("Unsupported build/format pair; run 'spring init --list'");
    }
    throw ex;
}

Prevention

When it happens

Trigger: Type detection active and the given --build/--format combination matches no type, e.g. '--build gradle --format something' not offered by the server.

Common situations: Passing a build (maven/gradle) with a format the server does not pair with it; an older server lacking a newer build/format combination.

Related errors


AI-assisted analysis of spring-projects/spring-boot@270dfe353f (2026-08-11). Data as JSON: /api/errors/ccc4cc6ba3502a23. Report an issue: GitHub.