Also, there is a Post File Acceptor available for download (for free) in
www.servlets.com
I've used it intensly with orion without problems
Juan Pablo Lorandi
Chief Software Architect
Code Foundry Ltd.
[EMAIL PROTECTED]
Barberstown, Straffan, Co. Kildare, Ireland.
Tel: +353-1-6012050 Fax: +353-1-6012051
Mobile: +353-86-2157900
www.codefoundry.com
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Ofur-Bjarni
Sent: Saturday, April 13, 2002 12:16 AM
To: Orion-Interest
Subject: RE: I/O Exception w/ file posting - 2nd try
Hi,
I don't know if you'll find this usefull since you don't want
to write your own, but implementing your own upload class is
not that difficult, this tutorial (see url below) (although
oriented around javamail) shows you how to do it and then you
can tweak it to your liking:
http://softwaredev.earthweb.com/java/sdjjavase/article/0,,1239
5_618471,00.ht
ml
cheers
Bjarni
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Shal Jain
Sent: 12. apríl 2002 10:20
To: Orion-Interest
Subject: I/O Exception w/ file posting - 2nd try
(warning long post follows)
UsingOrion 1.5.2.
I have a bunch of users doing some very high volume uploads
of files ranging anywhere from 1Mb to about 70Mb. I am using
Orion's FilePostParser class to parse the input stream and
collect files and other data.
Every so often (becoming regular now), I keep getting the
following sets of errors
com.evermind.server.http.HttpIOException: Read timed out
at com.evermind._crb.read(Unknown Source)
at com.evermind.io.FilePostParser._afc(Unknown Source)
at com.evermind.io.FilePostParser._ajc(Unknown Source)
at com.evermind.io.FilePostParser.init(Unknown Source)
com.evermind.server.http.HttpIOException: Connection reset by
peer: JVM_recv in socket input stream read at
com.evermind._crb.read(Unknown Source) at
com.evermind.io.FilePostParser._afc(Unknown Source) at
com.evermind.io.FilePostParser._ajc(Unknown Source) at
com.evermind.io.FilePostParser.init(Unknown Source) .
java.lang.ArrayIndexOutOfBoundsException
at com.evermind.io.FilePostParser._hy(Unknown Source)
at com.evermind.io.FilePostParser._aec(Unknown Source)
at com.evermind.io.FilePostParser._aic(Unknown Source)
at com.evermind.io.FilePostParser._ahc(Unknown Source)
at com.evermind.io.FilePostParser.hasMoreElements(Unknown
Source) ..
The users are sitting on a T1 and my server is at a managed
hosting site which has OCxx coming in. The servers
themselves have 100MBs LAN connnection to the switch. The
server is on a 1.2GHz dual proc with 1GB Ram.
Have others seen such errors. Are there any caveats to using
Orion's class. I am using the orion class in the following manner:
Enumeration enumeration = new
FilePostParser(request.getInputStream(), request.getContentLength());
(This line alone may generate the 2 different
flavors of HttpIOException listed above)
...
while(enumeration.hasMoreElements()) {// another
source of
error - mostly ArrayIndexOutOfBounds
{
Object element = enumeration.nextElement();
if ( element instanceof Map.Entry ) { // do something }
else if (element instanceof PostFileInputStream)
... // do a buffered read from stream using a
buffer of about 8K
int size = inStream.read(fileBytesArray,0,BUFFSIZE);
// -- another source of HttpIOException
}
}
}
What's really causing the errors? My understanding is that
for the enctype=multipart/form-data, its really a live input
stream which means that for a sufficiently large post not all
data will arrive in one chunk and the server will keep
getting data from the browser until its
been sent. I don't believe bandwitdth is an issue.
Do I need to switch to the orielly version of parser
classes. (I don't really want to write my own)
I'd appreciate any pointers/comments
TIA
-shal