Thanks Ben. That makes sense. I have opened a ticket:
https://jira.duraspace.org/browse/FCREPO-1192
-jeff
On Jun 19, 2013, at 3:36 PM, Benjamin Armintor wrote:
> Jeff-
> 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).
>
> The latter bug causes a mis-reported length for the DS (0), whereas the first
> causes your null-pointer. Did you file a JIRA issue for this?
>
> - Ben
>
>
> On Tue, Jun 18, 2013 at 2:43 PM, Jeff Minelli <[email protected]> wrote:
> Offline Eddie also suggested using fedora/upload. Problem is (or I believe
> it to be a problem) that hydra uses rubydora, and if I am correct (I have no
> doubts I could be wrong here, I did a cursory check of the gem), rubydora
> uses the same datastream REST method. If so this will cause some pain hydra
> side..
>
> If I ever get some spare time, I will attempt tests via upload and on 3.6+
> for completeness.
>
> Thanks,
>
> -jeff
>
>
> On Jun 14, 2013, at 3:38 PM, Benjamin Armintor <[email protected]> wrote:
>
> > Jeff-
> >
> > Embarrassingly, I'm still trying to put together an optional test in the
> > fcrepo 3 test suite that tries your request. I'll get back to you about
> > that, but in the meantime it appears to be the case that POSTing to
> > fedora/upload works, so you could use the location that's returned as the
> > dsLocation in a two-step process.
> >
> > - Ben
> >
> >
> > On Thu, Jun 13, 2013 at 10:47 AM, Jeff Minelli <[email protected]> wrote:
> > Output attached for a second test:
> > curl -H "Content-type:application/octet-stream" -vv -X POST -u
> > "myname:mypassword" --data-binary "@3g.data"
> > http://ss1test:8080/SStest2Fedora/objects/scholarsphere:5425k9692/datastreams/blah?controlGroup=M
> >
> > It fails in a similar way.
> >
> > -jeff
> >
> > On Jun 13, 2013, at 10:25 AM, Benjamin Armintor <[email protected]> wrote:
> >
> > > Jeff-
> > >
> > > Are you doing a multipart upload? If yes, can you try posting the file
> > > as the body of the request? I know that's not ideal, but it will test my
> > > hypothesis.
> > >
> > >
> > > On Thu, Jun 13, 2013 at 9:11 AM, Jeff Minelli <[email protected]> wrote:
> > > Attached are two files, the curl with errors, and the relevant part of
> > > fedora.log.
> > >
> > > Being desperate, I even tried to blame tomcat myself. :) I've toyed with
> > > maxPostSize, both using 0 and 4294967296. I even tried the web.xml config
> > > offered in
> > > http://tomcat.markmail.org/thread/6jxxcfg2s6rigl6w#query:+page:1+mid:e2l7wd7xhqiwwlpn+state:results
> > > to no success.
> > >
> > > -jeff
> > >
> > > On Jun 13, 2013, at 8:45 AM, Benjamin Armintor <[email protected]> wrote:
> > >
> > > > It's possible this is a bug in FCRepo- I'd need to see more of the
> > > > stacktrace, but we've seen issues like this before
> > > > (https://jira.duraspace.org/browse/FCREPO-704). You should also check
> > > > the limits on the maxPostSize in your tomcat configuration, though I
> > > > would expect a different error if that was the problem.
> > > >
> > > >
> > > > On Wed, Jun 12, 2013 at 2:43 PM, Jeff Minelli <[email protected]> wrote:
> > > > 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.
> > > >
> > > > Any ideas?
> > > >
> > > > Thanks,
> > > >
> > > > -jeff
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > This SF.net email is sponsored by Windows:
> >
> > Build for Windows Store.
> >
> > http://p.sf.net/sfu/windows-dev2dev
> > _______________________________________________
> > Fedora-commons-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
> >
> >
> > ------------------------------------------------------------------------------
> > This SF.net email is sponsored by Windows:
> >
> > Build for Windows Store.
> >
> > http://p.sf.net/sfu/windows-dev2dev_______________________________________________
> > Fedora-commons-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Fedora-commons-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev_______________________________________________
> Fedora-commons-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users