cancel
Showing results for 
Search instead for 
Did you mean: 

File upload issues with SAP WAS, cannot read from InputStream

0 Kudos

Hi All,

I have written fileupload.jsp which will upload the file attachment of size < 10 mb, the application is deployed in SAP WAS.

Initially we face upload issues like Please increase File Buffer Size, we increased the Read Buffer size and File Buffer in HTTP provider properties to 10mb in SAP VA admin tool.

We could resolve the attachment issues to an extent but we still face upload failures in 10 times try or randomly. The failures are not happening continously. I m getting the below exception in log:

l[com.sap.engine.services.httpserver.exceptions.HttpIllegalArgumentException: Cannot read from InputStream. The buffer is null or the offset and length are incorrect.

I believe there is no problem with coding, Could you please suggest me which HTTP Provider parameters we can fine tune to avoid the above issues?

I have deployed the same application in Tomcat but i couldn't see any issues even after number of uploads.

Regards,

Ravi.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ravi,

Since nobody has replied to this thread, I suggest you raise an OSS message with SAP and ask them.

And once this gets solved, do share the solution here as well.

Regards,

Shitij

0 Kudos

Hi shitij,

Thanks , i have raised oss note. Will update you once i get response.

Regards,

Ravi.

Former Member
0 Kudos

Hi,

I'm also experiencing the same problem.

Please share the solution when you'll have it...

Thanks.

0 Kudos

Hi ,

I have done the following changes, oss notes is of no use:

1) while (totalBytesRead < formDataLength)

{

byteRead = in.read( dataBytes, totalBytesRead, formDataLength - totalBytesRead );// changed the code here

totalBytesRead += byteRead;

}

2) Increase read buffer size of HTTP provider in VA admin

Regards,

Ravi.

Former Member
0 Kudos

Thanks!

Problem solved!

Former Member
0 Kudos

I was facing the same issue. Thanks Ravi for the solution. It worked perfectly.

Thanks

Vikram

0 Kudos

Hi Vikram,

Can you mark this as answered?

Regards,

Ravi.

Edited by: ravikanth kasim on May 11, 2011 8:23 AM