I faced the exact same issue and i think the problem is in the module 
dspace-rest, class org.dspace.rest.BitstreamResource, method 
updateBitstreamData which handles requests to update the bitstream data.

context.complete(); should be called 
after bitstreamStorageService.store(context, dspaceBitstream, is);

I think this is mistakenly removed and should be restored.

You can either do the change by overriding this particular class by using 
maven overlays or fix it in the module but don't forget to set the module 
to snapshot and update the related poms.
This change requires building dspace, updating it, and restarting the 
servlet container.

Hope this helps,
Elie Abu Haydar

On Monday, February 20, 2017 at 11:39:38 AM UTC+2, Sebastijan Elbl wrote:
>
> I'm trying to update the content of bitstream via REST API but I get : 
> HTTP 500 – Internal Server Error
>
>
> CURL:
>
> post new BITSTREAM:.
> curl --cookie "JSESSIONID=EDEC553C67C1AD18BDF4AC4A45EE6D0F" -H 
> "accept:application/json" -H "Content-Type: application/json" -X POST
>
> "localhost:8080/rest/items/d83bdd1c-553d-4529-9bcf-a783637befc9/bitstreams?name=test&description=testing"
>  
> -T "test.txt"
> result: http 200
>
>
> trying update previus BITSTREAM:
>
>
> curl --cookie "JSESSIONID=EDEC553C67C1AD18BDF4AC4A45EE6D0F" -H 
> "accept:application/json" -H "Content-Type: application/json" -X PUT
> "localhost:8080/rest/bitstreams/a8fbf6d5-9984-4b0d-8f76-cfa339e46f8d/data"
> -T "test2.txt
>
> result: http 500
>
>
> From dspace log:
> INFO org.dspace.content.BitstreamServiceImpl @ 
> *[email protected]::update_bitstream:bitstream_id=a8fbf6d5-9984-4b0d-8f76-cfa339e46f8d*
>  
> <javascript:>
>
> ERROR org.dspace.rest.Resource @ Something get wrong. Aborting context in 
> finally statement.
>
>
>
> From REST API documentation:
>
> PUT /bitstreams/{bitstream id}/data - Update the contents of the specified 
> bitstream.
>
>
> REST API is working otherwise, in DSpace 5.x there was no problem with 
> updating bitstream contents.
>
> Anyone can help me?
>
> Thanks
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to