title: Unable to find a MessageBodyReader of content-type application/json and type class java.lang.String
body: <p>I am using RestEasy client with jackson providers and getting the above error</p>
  
  <p>clientside code is: </p>
  
  <pre><code>ClientRequest request = new ClientRequest(url);
  request.accept(MediaType.APPLICATION_JSON);
  ClientResponse&lt;String&gt; response = request.get(String.class);
  
  if (response.getStatus() != 200) {
    throw new RuntimeException("Failed : HTTP error code : " + response.getStatus());
  }
  
  BufferedReader br =
    new BufferedReader(new InputStreamReader(new ByteArrayInputStream(response.getEntity().getBytes())));
  </code></pre>
  
  <p><code>response.getEntity()</code> is throwing <code>ClientResponseFailure</code> exception with the error being</p>
  
  <pre><code>Unable to find a MessageBodyReader of content-type application/json and type class java.lang.String
  </code></pre>
  
  <p>My server side code is below:</p>
  
  <pre><code>@GET
  @Path("/{itemId}")
  @Produces(MediaType.APPLICATION_JSON)
  public String item(@PathParam("itemId") String itemId) {
    //custom code
  
    return gson.toJSON(object);
  }
  </code></pre>