javax.ws.rs.WebApplicationException: org.fcrepo.server.errors.StreamWriteException: Error writing temp stream

Sakai JIRA | Jeff Minelli | 3 years ago
  1. 0

    I have a version of fedora 3.5 running that errors with javax.ws.rs.WebApplicationException: org.fcrepo.server.errors.StreamWriteException: Error writing temp stream at org.fcrepo.server.rest.BaseRestResource.handleException(BaseRestResource.java:172) at org.fcrepo.server.rest.DatastreamResource.addOrUpdateDatastream(DatastreamResource.java:583) … when I write a file 2GB in size (1024*1024*2048) via the API: curl -H "Content-type:application/octet-stream" -X POST -u "name:pass" --upload-file 3g.data \ http://host:8080/fedora/objects/scholarsphere:5425k9692/datastreams/blah?controlGroup=M But when I write a 2GB-1MB file (1024*1024*2047) via the API, it works without issue. Multipart uploads also do not work. Ben Armintor has been working with me on this and first identified https://jira.duraspace.org/browse/FCREPO-704 as a potential starting place. He has since followed up with: I've got a test verifying a bug in FCRepo 3.6 (and earlier) for content posted in the request body- I'll push a fix today (I think). There are two places in the REST library in which signed ints are being used got content-length in the kind of upload you have: https://github.com/fcrepo/fcrepo/blob/master/fcrepo-server/src/main/java/org/fcrepo/server/rest/RestUtil.java#L74 (where it's implicit in the j2ee interface, so we just have to ignore it and parse the header) and at https://github.com/fcrepo/fcrepo/blob/master/fcrepo-server/src/main/java/org/fcrepo/server/rest/RestUtil.java#L63 (our fault- that was clearly a place we missed when an earlier bug in this line was fixed 3 years ago).

    Sakai JIRA | 3 years ago | Jeff Minelli
    javax.ws.rs.WebApplicationException: org.fcrepo.server.errors.StreamWriteException: Error writing temp stream
  2. 0

    I have a version of fedora 3.5 running that errors with javax.ws.rs.WebApplicationException: org.fcrepo.server.errors.StreamWriteException: Error writing temp stream at org.fcrepo.server.rest.BaseRestResource.handleException(BaseRestResource.java:172) at org.fcrepo.server.rest.DatastreamResource.addOrUpdateDatastream(DatastreamResource.java:583) … when I write a file 2GB in size (1024*1024*2048) via the API: curl -H "Content-type:application/octet-stream" -X POST -u "name:pass" --upload-file 3g.data \ http://host:8080/fedora/objects/scholarsphere:5425k9692/datastreams/blah?controlGroup=M But when I write a 2GB-1MB file (1024*1024*2047) via the API, it works without issue. Multipart uploads also do not work. Ben Armintor has been working with me on this and first identified https://jira.duraspace.org/browse/FCREPO-704 as a potential starting place. He has since followed up with: I've got a test verifying a bug in FCRepo 3.6 (and earlier) for content posted in the request body- I'll push a fix today (I think). There are two places in the REST library in which signed ints are being used got content-length in the kind of upload you have: https://github.com/fcrepo/fcrepo/blob/master/fcrepo-server/src/main/java/org/fcrepo/server/rest/RestUtil.java#L74 (where it's implicit in the j2ee interface, so we just have to ignore it and parse the header) and at https://github.com/fcrepo/fcrepo/blob/master/fcrepo-server/src/main/java/org/fcrepo/server/rest/RestUtil.java#L63 (our fault- that was clearly a place we missed when an earlier bug in this line was fixed 3 years ago).

    Sakai JIRA | 3 years ago | Jeff Minelli
    javax.ws.rs.WebApplicationException: org.fcrepo.server.errors.StreamWriteException: Error writing temp stream
  3. 0

    Server-Sent Event with Jersey and weblogic

    Stack Overflow | 3 years ago | Pavan Kumar
    javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class org.glassfish.jersey.media.sse.EventOutput, and Java type class org.glassfish.jersey.media.sse.EventOutput, and MIME media type text/event-stream was not found
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Jersey application - Error on start up

    Stack Overflow | 5 months ago | AJJ
    javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class com.sun.proxy.$Proxy553, and Java type interface javax.servlet.http.HttpServletResponse, and MIME media type application/octet-stream was not found.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.ws.rs.WebApplicationException

      org.fcrepo.server.errors.StreamWriteException: Error writing temp stream

      at org.fcrepo.server.rest.BaseRestResource.handleException()
    2. org.fcrepo.server
      DatastreamResource.addOrUpdateDatastream
      1. org.fcrepo.server.rest.BaseRestResource.handleException(BaseRestResource.java:172)
      2. org.fcrepo.server.rest.DatastreamResource.addOrUpdateDatastream(DatastreamResource.java:583)
      2 frames