{"id":"386cbec439fef98f","repo":"spring-projects/spring-boot","slug":"no-content-received-from-server-serviceurl","errorCode":null,"errorMessage":"No content received from server '${serviceUrl}'","messagePattern":"No content received from server '(.+?)'","errorType":"exception","errorClass":"ReportableException","httpStatus":null,"severity":"error","filePath":"cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java","lineNumber":146,"sourceCode":"\t\tContentType contentType = ContentType.create(httpEntity.getContentType());\n\t\tif (contentType.getMimeType().equals(\"text/plain\")) {\n\t\t\treturn getContent(httpEntity);\n\t\t}\n\t\treturn parseJsonMetadata(httpEntity);\n\t}\n\n\tprivate InitializrServiceMetadata parseJsonMetadata(HttpEntity httpEntity) throws IOException {\n\t\ttry {\n\t\t\treturn new InitializrServiceMetadata(getContentAsJson(httpEntity));\n\t\t}\n\t\tcatch (JSONException ex) {\n\t\t\tthrow new ReportableException(\"Invalid content received from server (\" + ex.getMessage() + \")\", ex);\n\t\t}\n\t}\n\n\tprivate void validateResponse(ClassicHttpResponse httpResponse, String serviceUrl) {\n\t\tif (httpResponse.getEntity() == null) {\n\t\t\tthrow new ReportableException(\"No content received from server '\" + serviceUrl + \"'\");\n\t\t}\n\t\tif (httpResponse.getCode() != 200) {\n\t\t\tthrow createException(serviceUrl, httpResponse);\n\t\t}\n\t}\n\n\tprivate ProjectGenerationResponse createResponse(ClassicHttpResponse httpResponse, HttpEntity httpEntity)\n\t\t\tthrows IOException {\n\t\tProjectGenerationResponse response = new ProjectGenerationResponse(\n\t\t\t\tContentType.create(httpEntity.getContentType()));\n\t\tresponse.setContent(FileCopyUtils.copyToByteArray(httpEntity.getContent()));\n\t\tString fileName = extractFileName(httpResponse.getFirstHeader(\"Content-Disposition\"));\n\t\tif (fileName != null) {\n\t\t\tresponse.setFileName(fileName);\n\t\t}\n\t\treturn response;\n\t}\n","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/spring-projects/spring-boot/blob/5b2dbdbb8be64415eb6552f81ff7c449c8d251e6/cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java#L128-L164","documentation":"Error \"No content received from server '${serviceUrl}'\" thrown in spring-projects/spring-boot.","triggerScenarios":"Thrown at cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java:146 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"5b2dbdbb8be64415eb6552f81ff7c449c8d251e6","analyzedAt":"2026-08-04T18:53:14.967Z","schemaVersion":2}