{"record":{"id":"ccc4cc6ba3502a23","repo":"spring-projects/spring-boot","slug":"no-type-found-with-build-and-format-chec","errorCode":null,"errorMessage":"No type found with build '{}' and format '{}' check the service capabilities (--list)","messagePattern":"No type found with build '(.+?)' and format '(.+?)' check the service capabilities \\(--list\\)","errorType":"exception","errorClass":"ReportableException","httpStatus":null,"severity":"error","filePath":"cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerationRequest.java","lineNumber":385,"sourceCode":"\t\t\tif (result == null) {\n\t\t\t\tthrow new ReportableException(\n\t\t\t\t\t\t(\"No project type with id '\" + this.type + \"' - check the service capabilities (--list)\"));\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse if (isDetectType()) {\n\t\t\tMap<String, ProjectType> types = new HashMap<>(metadata.getProjectTypes());\n\t\t\tif (this.build != null) {\n\t\t\t\tfilter(types, \"build\", this.build);\n\t\t\t}\n\t\t\tif (this.format != null) {\n\t\t\t\tfilter(types, \"format\", this.format);\n\t\t\t}\n\t\t\tif (types.size() == 1) {\n\t\t\t\treturn types.values().iterator().next();\n\t\t\t}\n\t\t\telse if (types.isEmpty()) {\n\t\t\t\tthrow new ReportableException(\"No type found with build '\" + this.build + \"' and format '\" + this.format\n\t\t\t\t\t\t+ \"' check the service capabilities (--list)\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new ReportableException(\"Multiple types found with build '\" + this.build + \"' and format '\"\n\t\t\t\t\t\t+ this.format + \"' use --type with a more specific value \" + types.keySet());\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tProjectType defaultType = metadata.getDefaultType();\n\t\t\tif (defaultType == null) {\n\t\t\t\tthrow new ReportableException((\"No project type is set and no default is defined. \"\n\t\t\t\t\t\t+ \"Check the service capabilities (--list)\"));\n\t\t\t}\n\t\t\treturn defaultType;\n\t\t}\n\t}\n\n\t/**","sourceCodeStart":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/spring-projects/spring-boot/blob/270dfe353fb830fd69b823a8a859287ff103854b/cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerationRequest.java#L367-L403","documentation":"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.","triggerScenarios":"Type detection active and the given --build/--format combination matches no type, e.g. '--build gradle --format something' not offered by the server.","commonSituations":"Passing a build (maven/gradle) with a format the server does not pair with it; an older server lacking a newer build/format combination.","solutions":["Run 'spring init --list' to see supported build/format combinations","Set --type explicitly to a supported id","Adjust --build and --format to a supported pair"],"exampleFix":"// before\n$ spring init --build gradle --format unknown\n// after\n$ spring init --build gradle  # omit the unsupported format","handlingStrategy":"validation","validationCode":"// In detect mode, pre-filter types to confirm the build/format pair resolves.\nInitializrServiceMetadata md = service.loadMetadata(serviceUrl);\njava.util.Map<String, ProjectType> candidates = new java.util.HashMap<>(md.getProjectTypes());\nif (request.getBuild() != null) filter(candidates, \"build\", request.getBuild());\nif (request.getFormat() != null) filter(candidates, \"format\", request.getFormat());\nif (candidates.isEmpty()) {\n    throw new IllegalArgumentException(\n        \"No type matches build=\" + request.getBuild() + \", format=\" + request.getFormat()\n        + \". Run --list.\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    request.determineProjectType(metadata);\n} catch (ReportableException ex) {\n    if (ex.getMessage().startsWith(\"No type found with build\")) {\n        Log.error(\"Unsupported build/format pair; run 'spring init --list'\");\n    }\n    throw ex;\n}","preventionTips":["Cross-check build/format pairs against --list output","Prefer setting --type explicitly when you need determinism","Avoid mixing a build with a format the server does not pair"],"tags":["initializr","project-type","validation","user-input","spring-boot-cli"],"backgroundTag":null,"analyzedSha":"270dfe353fb830fd69b823a8a859287ff103854b","analyzedAt":"2026-08-11T19:42:06.541Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}