Rest Template: Could Not Extract Response – No Suitable HttpMessageConverter Found for Response Type [X] and Content Type [application/json;charset=UTF-8]


When invoking a web service using RestTemplate:-

restTemplate.getForObject("http://server/api", MyBean[].class));

… the following exception occurs:-

Exception in thread "main" org.springframework.web.client.RestClientException: 
Could not extract response: no suitable HttpMessageConverter found for response 
type [class [LMyBean;] and content type [application/json;charset=UTF-8]
	at org.springframework.web.client.HttpMessageConverterExtractor.extractData(
	at org.springframework.web.client.RestTemplate.doExecute(
	at org.springframework.web.client.RestTemplate.execute(
	at org.springframework.web.client.RestTemplate.getForObject(


If the content type is JSON, add the following dependency:-



  1. Farzin says:

    Thanks a lot. I did a lot of searches to find your solution to my problem even if the cause of mine was not exactly the same (I had to remove test from pom.xml)

  2. maher says:

    hi please where did you find test , i try the solution of this post but it doesn’t work for me . Can any one help me .

Leave a Reply

Your email address will not be published. Required fields are marked *