I am trying to upload a 25 MB file from the browser(IE 6). The app server is Websphere (4.0.6) and HTTP Server is IBM Http Server (1.3.19).
I use com.oreilly.servlet.multipart.MultipartParser for uploading.
Example,
MultipartParser parser = null;
String redirect = null;
Bean sb = null;
try {
parser = new MultipartParser(req, 26214400);
// max size of image is 25MB
Part part;
FilePart filePart = null;
while ((part = parser.readNextPart()) != null)
{
String paramName = part.getName();
if (part.isFile()) {
filePart = (FilePart) part;
InputStream is = filePart.getInputStream();
ObjectInputStream o = new ObjectInputStream(is);
sb = (Bean) o.readObject();
o.close();
// add the bean object to the DB:
I setup a server from WSAD(Websphere Application development on WIN XP) and upload the file of 25mb, the upload is fine without any errors. It works perfectly.
BUT, but any image over 10 MB of size doesnt upload (in Websphere running on AIX 5) and throws an error.
I am trying on this issue since 4 days now without any benefit.
The error thrown is,
java.io.IOException: Corrupt form data: premature ending
at com.oreilly.servlet.multipart.MultipartParser.<init>(MultipartParser.java:166)
at com.oreilly.servlet.multipart.MultipartParser.<init>(MultipartParser.java:94)
at mypackage.servlets.dev.Saver.doPost(Saver.java:52)
and sometimes
java.io.IOException: unexpected end of part
at com.oreilly.servlet.multipart.PartInputStream.fill(PartInputStream.java(Compiled Code))
at com.oreilly.servlet.multipart.PartInputStream.read(PartInputStream.java(Compiled Code))
at java.io.ObjectInputStream.readFullyInternal(ObjectInputStream.java(Inlined Compiled Code))
at java.io.ObjectInputStream.bufferData(ObjectInputStream.java(Compiled Code))
at java.io.ObjectInputStream.readInt(ObjectInputStream.java(Compiled Code))
at java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled Code))
at java.io.ObjectInputStream.inputArray(ObjectInputStream.java(Compiled Code))
at java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled Code))
at java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled Code))
1) why does the upload happen fine when run in local WSAD environment and not in live environment?
2) Are there known issues in Websphere 4.0.6 and IBM HTTP Szerver 1.3.19?
3) What are the other options available for uploading larger file size other than using com.oreilly.servlet.multipart.MultipartParser?
please give me your very valuable feedback
Thanks in advance