title: no suitable HttpMessageConverter found for response type [com.src.model.UserDTO] and content type [text/html;charset=UTF-8]
body: <p>first of all, i've already read all questions related with this topic in stackoverflow, but i can't find the solution. I have been working on this for days.</p>
  
  <p>I have this restFull web app built with spring mvc. When i try to retrieve a User i get this error:</p>
  
  <pre><code>org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [com.src.model.UserDTO] and content  type [text/html;charset=UTF-8]
  org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessag eConverterExtractor.java:84)
  org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:627)
  org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:1)
  org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:454)
  org.springframework.web.client.RestTemplate.execute(RestTemplate.java:409)
  org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:385)
  com.src.web.controller.HomeController.getHome(HomeController.java:42)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:606)
  org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
  org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
  org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)
  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604)
  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565)
  org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
  </code></pre>
  
  <p>The request <strong>never</strong> reach the server, so the problem isn't the response content-type, because there is no response. So i am loss there. I show here my classes and configs, if some info is missed, please let me know, and i will update the question. Thanks!</p>
  
  <p>Client controller:</p>
  
  <pre><code>@Controller
  public class HomeController extends GenericAbstractController{
  
  @RequestMapping(value = "/home", method = RequestMethod.GET)
  public String getHome(HttpServletRequest request, Model model) {
      Principal userPrincipal = request.getUserPrincipal();
  
      List&lt;MediaType&gt; acceptableMediaTypes = new ArrayList&lt;MediaType&gt;();
      acceptableMediaTypes.add(MediaType.APPLICATION_XML);
  
      HttpHeaders headers = new HttpHeaders();
      headers.setContentType(MediaType.APPLICATION_XML);
      headers.setAccept(acceptableMediaTypes);
      HttpEntity&lt;UserDTO&gt; entity = new HttpEntity&lt;UserDTO&gt;(headers);
  
      ResponseEntity&lt;UserDTO&gt; result = restTemplate.exchange("http://localhost:8080/rideon/users/{id}", 
              HttpMethod.GET, entity, UserDTO.class, userPrincipal.getName());
  
      model.addAttribute("user", result.getBody());
  
  
      return "home";
  }
  </code></pre>
  
  <p>Server controller: </p>
  
  <pre><code>@Controller
  public class UsersController {
  
  private static final Logger LOGGER = LoggerFactory.getLogger(UsersController.class);
  @Autowired
  private UserService userService;
  
  @RequestMapping(value = "users/{id}", method = RequestMethod.GET, headers = "Accept=application/xml")
  @ResponseBody
  public UserDTO getUser(@PathVariable("id") String id) {
      return userService.getUserById(id);
  }
  </code></pre>
  
  <p>User:</p>
  
  <pre><code>@XmlRootElement
  @Entity(name = "users")
  public class UserDTO implements Serializable {
  
  @Id
  private String email;
  private String password;
  private String name;
  
  
  
  public String getPassword() {
      return password;
  }
  
  public void setPassword(String password) {
      this.password = password;
  }
  
  public String getEmail() {
      return email;
  }
  
  public void setEmail(String email) {
      this.email = email;
  }
  
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  }
  </code></pre>
  
  <p>Application-context:</p>
  
  <pre><code>&lt;bean id="restTemplate" class="org.springframework.web.client.RestTemplate"&gt;
      &lt;property name="messageConverters"&gt;
          &lt;list&gt;
              &lt;bean id="marshallingHttpMessageConverter"
                    class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter"&gt;
                  &lt;property name="marshaller" ref="jaxbMarshaller" /&gt;
                  &lt;property name="unmarshaller" ref="jaxbMarshaller" /&gt;
              &lt;/bean&gt;   
              &lt;bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter" /&gt;
              &lt;bean class="org.springframework.http.converter.FormHttpMessageConverter" /&gt;
              &lt;bean class="org.springframework.http.converter.StringHttpMessageConverter" /&gt;
              &lt;bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter" /&gt;
              &lt;bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter" /&gt;
              &lt;bean class="org.springframework.http.converter.xml.XmlAwareFormHttpMessageConverter" /&gt;
              &lt;bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" /&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"&gt;
      &lt;property name="classesToBeBound"&gt;
          &lt;list&gt;
              &lt;value&gt;com.src.model.UserDTO&lt;/value&gt;
              &lt;value&gt;com.src.model.MultimediaDTO&lt;/value&gt;
              &lt;value&gt;com.src.model.BicycleDTO&lt;/value&gt;
              &lt;value&gt;com.src.model.FriendshipRequestDTO&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Dependencies: </p>
  
  <pre><code>   &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
          &lt;version&gt;1.9.13&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-core-asl&lt;/artifactId&gt;
          &lt;version&gt;1.9.13&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
          &lt;version&gt;2.2.9&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  </code></pre>