When using putObject with BufferedInputStream - java.io.IOException: Resetting to invalid mark

359 views
Skip to first unread message

testuser

unread,
Mar 11, 2016, 6:31:41 PM3/11/16
to Spectra Logic S3 SDKs and APIs
Hi,
Couple of questions.
1. When using putObject with BufferedInputStream, get following error - java.io.IOException: Resetting to invalid mark. I have the correct chunk offset and size as returned by the GetJobChunksReadyForClientProcessingSpectraS3Response - since i am using small files offset is 0 and length is entire file size.
Note : I have tried with 10B and 1KB files. In both cases get same error.

2. Also, if a put object fails then subsequent putObject requests to that bucket fail with error -
Status Code (CONFLICT) Message: RPC DataPlanner.createPutJob<380745> FAILED: Conflicts exist with existing data objects: [<object name>].

Thanks.

Jeff Braunstein

unread,
Mar 11, 2016, 6:54:18 PM3/11/16
to Spectra Logic S3 SDKs and APIs
Hi Archana, can you please show us your code? Thanks.

Ryan Moore

unread,
Mar 11, 2016, 7:42:19 PM3/11/16
to Spectra Logic S3 SDKs and APIs
Do you see the same error when using unbuffered io?

--
Ryan Moore

testuser

unread,
Mar 13, 2016, 5:18:59 PM3/13/16
to Spectra Logic S3 SDKs and APIs
I have an input stream that does not support mark and reset. I guess the putObject call needs a mark supported stream and it failed with such error. So I have wrapped it in with BufferedInputStream and get the invalid mark error.
Btw, I use the same input stream when doing put with amazon s3 api and it works when uploading to aws.. 

testuser

unread,
Mar 14, 2016, 2:57:05 PM3/14/16
to Spectra Logic S3 SDKs and APIs
Yes, without using unbuffered io the error was about stream not supporting mark and reset. So had to use BufferedInputStream.

Jeff Braunstein

unread,
Mar 15, 2016, 3:57:39 PM3/15/16
to Spectra Logic S3 SDKs and APIs
Hi Archana, were you able to resolve this issue? If not, can you please provide a code example? Thanks.
Reply all
Reply to author
Forward
0 new messages