File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes SocketException while uploading File of more than 2GB via Apache HttpClient Object in Websphere Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "SocketException while uploading File of more than 2GB via Apache HttpClient Object in Websphere" Watch "SocketException while uploading File of more than 2GB via Apache HttpClient Object in Websphere" New topic
Author

SocketException while uploading File of more than 2GB via Apache HttpClient Object in Websphere

Vinod Borole
Greenhorn

Joined: Feb 25, 2009
Posts: 26
Hello,

I have a requirement of uploading zip files of more than 2GB size on a server. In order to achieve this i am using Apache HttpClient Object (org.apache.commons.httpclient)

If i deploy my application on Tomcat 5.5, I can successfully upload more than 5GB of zip files without making any changes in Tomcat configuration files. However when i try the same application on IBM Websphere 6.0 and 7.0 i cannot upload zip files of 2GB size and more, following is the exception i am getting. Is their any limitation on Websphere on maximum size file upload anything like maxRequestLength (setting found in .NET) found in Websphere.

Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1220

Hi Vinod,

unfortunately I don't know details about Websphere so I can't tell you exactly why it behaves like this. But Apache (the well-known HTTP server) has the same limitation in some versions on some systems. As far as I know the origin of this problem was, at least on Linux with Apache 2.0.x, because of limitations of some filesystem.

I guess, this doesn't help you very much but could it be that the said Tomcat and Websphere servers are running on a different machine with a different OS? Just a thought...

Marco
Vinod Borole
Greenhorn

Joined: Feb 25, 2009
Posts: 26
Hi Marco,

Thank you for responding to my post. I really appreciate that.

More details, both the machines that run Tomcat and Webspher have same O.S which is WindowXP.

Later after posting this problem i tried to check how many bytes that HttpClient is trying to write out of 2GB file on the request, i can see that it writes some number of bytes and throws the following exception, one good thing i noticed over here is that it does the same thing 3 times - (It is something like it gives 3 tries to write bytes on request, everytime it errors out) But unfortunately on every try it throws same exception.


Can any one give me any suggestion as to how i can fix this problem?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: SocketException while uploading File of more than 2GB via Apache HttpClient Object in Websphere
 
Similar Threads
How to print list of Files?
error handling
Interesting error with CipherInputStream
Jtable boolean checkboxes
Java (blueJ)