Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1730

Could not find MessageBodyWriter for java.lang.Boolean

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.1.4.Final
    • Fix Version/s: 4.0.0.Beta1
    • Component/s: jaxrs
    • Labels:
      None

      Description

      If a resource method without @Consumes or @Produces annotated.

      @Path("test")
      public class TestResource {
      @GET
      @Path("/getbool")
      public boolean testBoolean()

      { return true; }

      }

      And client sends request with :
      Invocation.Builder request = client.target("http://localhost:8080/somear/test/getbool")).request();
      Response response = request.get();
      String entity = response.readEntity(String.class);
      Resteasy throws Resteasy server throws exception : Could not find MessageBodyWriter for response object of type: java.lang.Boolean of media type: application/octet-stream

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jim.ma Jim Ma
                Reporter:
                jim.ma Jim Ma
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: