title: org.springframework.web.client.RestClientException: Could not write request: no suitable HttpMessageConverter found for request type
body: <pre><code>response.setContentType("application/json");
  response.setCharacterEncoding("UTF-8");
  PrintWriter out = response.getWriter();  
  
  String Empcode="10743";
  String password="IsaiVanan";
  
  final String uri = "https://vtop9.vit.ac.in/vtoplogin/employeeLoginPost";
  
  RestTemplate restTemplate = new RestTemplate();
  
  HttpHeaders headers = new HttpHeaders();
  headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
  headers.setContentType(MediaType.APPLICATION_JSON);
  
  MultiValueMap&lt;String, String&gt; postParams = new LinkedMultiValueMap&lt;String, String&gt;();
  postParams.add("userid",Empcode);
  postParams.add("pwd",password);
  
  HttpEntity&lt;MultiValueMap&lt;String, String&gt;&gt; entity = new HttpEntity&lt;&gt; (postParams,headers);
  System.out.println("Try coming1..!");
  
  ResponseEntity&lt;UserValidation&gt; result = restTemplate.exchange(uri, HttpMethod.POST,entity, UserValidation.class);
  
  System.out.print("result..."+result.getBody().getResponseMsg());        
  </code></pre>
  
  <p>I did everything which i add dependency of rest api,
  this witch i did response content in application/json still; it not working i find that solution only in some stackoverflow verify..!</p>
  
  <pre><code>public class UserValidation {
  
      private String responseMsg ;
      private Integer responseCode;
      public String getResponseMsg() {
          return responseMsg;
      }
      public void setResponseMsg(String responseMsg) {
          this.responseMsg = responseMsg;
      }
      public Integer getResponseCode() {
          return responseCode;
      }
      public void setResponseCode(Integer responseCode) {
          this.responseCode = responseCode;
      }
  
  }
  
  
  org.springframework.web.client.RestClientException: Could not write request: no suitable HttpMessageConverter found for request type [org.springframework.util.LinkedMultiValueMap] and content type [application/json]
      at org.springframework.web.client.RestTemplate$HttpEntityRequestCallback.doWithRequest(RestTemplate.java:597)
      at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:436)
      at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:401)
      at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:377)
      at sample.doGet(sample.java:82)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:625)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1372)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>error occurs when i add jar files in project of build path, namely rest api jar, spring frameworks...</p>
  
  <p>error shows and consult with everyone which they did know about rest api.</p>
  
  <p>which someone please find the solution and get the corrected output please</p>