Q: RestTemplate RestClientException Could not extract response: no suitable HttpMessageConverter found I am getting this error when calling the RestTemplate method
GetStatusRestfulResponse response = restTemplate.getForObject(restRequest.getUrl(), GetStatusRestfulResponse.class,restRequest.getParams());

>org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [class GetStatusRestfulResponse] and content type [application/json]
at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:108)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:550)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:511)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:248)

RestTemplate restTemplate = new RestTemplate();
    HttpClient httpClient   = HttpClientBuilder.create().setDefaultCredentialsProvider(setupAuthentication(restRequest)).build();
    HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient);
    requestFactory.setReadTimeout(restRequest.getReqTimeOut());
    restTemplate.setRequestFactory(requestFactory);
    restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());
response = restTemplate.getForObject(restRequest.getUrl(),     GetStatusRestfulResponse.class,restRequest.getParams());       


A: I was able to solve the issue . the culprit was the java object I was using GetStatusRestfulResponse.
I took the following steps to debug the issue.


*

*Got the source codes for spring-web and jackson-databind.

*on debugging in the spring and jackson source code, realized that the issue was with the ObjectMapper not able to deserialize the java object.

*The issue was that my Java object had inner classes .


in order to fix the problem with ObjectMapper not able to deserialize the java object , I had to


*

*Add default no parameter constructors for the main java class and inner classes.

*Made the inner classes static.
this solved the issue :) 
