jax-rs-spec
  1. jax-rs-spec
  2. JAX_RS_SPEC-218

Primitive types not supported natively in return types

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: runtime
    • Labels:
      None

      Description

      @GET
      @Path("/value")
      public int getValue()

      { return 4; }

      throws the following exception:

      ERROR:Caused by: com.sun.jersey.api.MessageException: A message body writer for Java class java.lang.Integer, and Java type int, and MIME media type text/plain was not found

      Java primitive types should be natively supported by the JAX-RS spec.

        Activity

        Hide
        Santiago Pericas-Geertsen added a comment -

        Resolved, see Section 4.2.4.

        Show
        Santiago Pericas-Geertsen added a comment - Resolved, see Section 4.2.4.
        Hide
        Marek Potociar added a comment -

        Spec wording needs update.

        Show
        Marek Potociar added a comment - Spec wording needs update.

          People

          • Assignee:
            Santiago Pericas-Geertsen
            Reporter:
            arungupta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: