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

Could not find MessageBodyWriter for java.lang.Boolean

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.0.0.Beta1, 3.5.0.CR1
    • 3.1.4.Final
    • jaxrs
    • 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

      Attachments

        Activity

          People

            rhn-engineering-ema Jim Ma
            rhn-engineering-ema Jim Ma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: