jersey
  1. jersey
  2. JERSEY-1780

Response#close throws IllegalStateException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0-m13
    • Fix Version/s: 2.0-rc1, 2.0
    • Component/s: core
    • Labels:
      None

      Description

      Response response = Response.ok("entity").build();
      response.close();
      

      throws

      java.lang.IllegalStateException: Stream provider is not defined. It must be set before writing first bytes to the entity output stream.
      at com.google.common.base.Preconditions.checkState(Preconditions.java:149)
      at org.glassfish.jersey.message.internal.CommittingOutputStream.commitStream(CommittingOutputStream.java:182)
      at org.glassfish.jersey.message.internal.CommittingOutputStream.commitStream(CommittingOutputStream.java:177)
      at org.glassfish.jersey.message.internal.CommittingOutputStream.commit(CommittingOutputStream.java:245)
      at org.glassfish.jersey.message.internal.CommittingOutputStream.close(CommittingOutputStream.java:250)
      at org.glassfish.jersey.message.internal.OutboundMessageContext.close(OutboundMessageContext.java:843)
      at org.glassfish.jersey.message.internal.OutboundJaxrsResponse.close(OutboundJaxrsResponse.java:206)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Marek Potociar
            Reporter:
            jan.supol
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours
              2h