-
Notifications
You must be signed in to change notification settings - Fork 41.2k
restTemplate.exchange have exception "insufficient data written" with springboot 3.3 #41087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Duplicates spring-projects/spring-framework#33015 |
Hi . |
please help on this |
insufficient data written : I/O error on POST request for http://some.com/ this error is coming in using RestTemplate in springboot3.3 version |
@rajukosna we never got the sample we requested. Note: if you cannot reproduce the problem with a minimal sample application this is likely to be a problem specific to your application. In this case please ask a question on StackOverflow. |
@bclozel Thank you for your quick response |
@bclozel ResponseEntity<ResponseDTO> responseEntity = null;
try {
LOGGER.info(REST_CALL_FOR_URL);
if (headers == null) {
headers = new HttpHeaders();
}
headers.add(HEADER_NAME, getFullContextInJson());
HttpEntity<?> httpEntity = new HttpEntity<>(body, headers);
responseEntity = restTemplate.exchange(UriComponentsBuilder.fromHttpUrl(url).build(true).toUriString(),
httpMethod, httpEntity, ResponseDTO.class);
return responseEntity;
} catch (RestClientException restClientException) {
logger(restClientException);
return new ResponseEntity<>(restClientException.getMessage(), HttpStatus.BAD_REQUEST);
} ERROR: insufficient data written : I/O error on POST request for "http://localhost:8083/api/o......... ": insufficient data |
Thanks for the code snippet but I can't reproduce this issue. |
Thanks you |
@rajukosna We need a complete sample application to be able to help you. That way we know exactly what library versions you're using and how your application is configured. You should also upgrade to 3.3.7 or 3.4.1 |
Uh oh!
There was an error while loading. Please reload this page.
The example use springboot 3.0 is normal, but use springboot 3.3 have exception.
Maybe it is different from #31902
detail error:
example code:
The text was updated successfully, but these errors were encountered: