This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic Connection reset while reading a large file  RSS feed

Deepthi Musunuru
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have built java based REST Webservices for the mobile app to interact with Sharepoint server. We are hosting webservices on weblogic server. Textual data is transferred in JSON format and file assets are transferred to iPad application as a binary stream. We are using HTTP GET to retrieve the file asset from the sharepoint. We have been noticing issues while trying to retrieve file assets which are greater than 20MB and only in production environment.

For files greater than 20MB, we have been noticing reset or Socket closed depending on when the socket is closed.

We are using Apache HTTPClient 4.2 as http client and apache commons IO library for IO copy.

Below is the code -

This is only happening in production and uat environments where we cannot have wireshark installed to debug this further. Have validated the sharepoint setting and weblogic settings and they are same as other environments.

Below is the stack trace of the error -

Luan Cestari
Ranch Hand
Posts: 172
C++ Redhat Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The connection reset comes from the client side (not the server you are getting the date), which means a stale object/connection. I saw that the CloseShieldInputStream ( ) doesn't close the connection, so you need to close the contentStream in the finally block.

Best regards,
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!