title: RestEasy: Could not find MessageBodyWriter for response object of type: java.util.ArrayList of media type: application/json
body: <blockquote>
    <p>message: Could not find MessageBodyWriter for response object of type:
    java.util.ArrayList of media type: application/json</p>
    
    <p>Description: The server encountered an internal error (Could not find
    MessageBodyWriter for response object of type: java.util.ArrayList of
    media type: application/json) that prevented it from fulfilling this
    request</p>
  </blockquote>
  
  <pre><code>@GET
  @Path("/{userName}/questions")
  //@Produces("application/json")
  public Response getUserQuestions(@PathParam("userName") String userName){               
      UserDAO userDAO = new UserDAO();        
      List&lt;Question&gt; questions = userDAO.getUserQuestionsByUserName(userName);        
      GenericEntity&lt;List&lt;Question&gt;&gt; entity = new GenericEntity&lt;List&lt;Question&gt;&gt;(questions){};      
      return Response.status(200).entity(entity).type(MediaType.APPLICATION_JSON).build();
  }
  </code></pre>
  
  <p>I have got the resteasy jackson provider in the classpath.
  Tried changing the return type form <code>ArrayList</code> to <code>List</code>, then wrapping it in <code>GenericEntity</code> based on <a href="https://stackoverflow.com/questions/9868722/resteasy-response">resteasy response</a>, but still getting the same issue.</p>
  
  <p>Running on tomcat7.</p>
  
  <p>Thanks.</p>