RE: I/O Exception w/ file posting - 2nd try

2002-04-12 Thread Ofur-Bjarni

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,,12395_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










RE: arrg please help

2002-04-03 Thread Ofur-Bjarni

Actually I worked that one out and got a new, better bug. This was happening
because I didn't set exclusive-write-access to false in
orion-ejb-jar.xml. Since I'm using cmp, I don't have any statements of my
own.

thanks,
Bjarni

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of John Creaner
Sent: 3. apríl 2002 11:50
To: Orion-Interest
Subject: RE: arrg please help


thats sounds like an sql issue, are you closing your statement before you
get all the information in the resultset back??

John Creaner
Software Development,
e-Spatial Solutions,
Ireland.
Tel: 353 (0)1 867 5500
Fax: 353 (0)1 867 5599

Direct Tel: 353 (0)1 867 5508
[EMAIL PROTECTED]



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ofur-Bjarni
Sent: 03 April 2002 08:35
To: Orion-Interest
Subject: arrg please help


I have an existing database and I am trying to make an entity bean that
retrieves data from one of it's tables.

I have set the autocreate-table to false, and everything deploys nicely, but
when I try to list the contents of the table (using findAll()) then I get
this error:

com.evermind.server.rmi.OrionRemoteException: Database error: Closed
Statement: next; nested exception is: java.sql.SQLException: Closed
Statement: next

And I have no idea what to do. I know that the datasource works, because I
have used it for other purposes.

Thanks,
Bjarni








RE: arrg please help

2002-04-03 Thread Ofur-Bjarni

I already posted this, but I seem to have have mis-posted it:

Actually I worked that one out and got a new, better bug. This was happening
because I didn't set exclusive-write-access to false in
orion-ejb-jar.xml. Since I'm using cmp, I don't have any statements of my
own.

thanks,
Bjarni

ps: What is the correct way to post questions and answers to the list?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Greg Davis
Sent: 3. apríl 2002 14:23
To: Orion-Interest
Subject: RE: arrg please help


Are you using CMP or BMP with your entity bean?  It sounds like BMP and you
are accidentally closing the connetion somewhere you are not supposed to
inside the bean.  What kind of database are you connecting to (i.e. MySQL,
SQL Server, Oracle,etc...)

I need a little more info here before I can try to help. :-)

Later...
Greg


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of John Creaner
Sent: 3. apríl 2002 11:50
To: Orion-Interest
Subject: RE: arrg please help

thats sounds like an sql issue, are you closing your statement before you
get all the information in the resultset back??

John Creaner
Software Development,
e-Spatial Solutions,
Ireland.
Tel: 353 (0)1 867 5500
Fax: 353 (0)1 867 5599

Direct Tel: 353 (0)1 867 5508
[EMAIL PROTECTED]



-Original Message-
From: Ofur-Bjarni [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 12:35 AM
To: Orion-Interest
Subject: arrg please help


I have an existing database and I am trying to make an entity bean that
retrieves data from one of it's tables.

I have set the autocreate-table to false, and everything deploys nicely, but
when I try to list the contents of the table (using findAll()) then I get
this error:

com.evermind.server.rmi.OrionRemoteException: Database error: Closed
Statement: next; nested exception is: java.sql.SQLException: Closed
Statement: next

And I have no idea what to do. I know that the datasource works, because I
have used it for other purposes.

Thanks,
Bjarni






arrg please help

2002-04-02 Thread Ofur-Bjarni

I have an existing database and I am trying to make an entity bean that
retrieves data from one of it's tables.

I have set the autocreate-table to false, and everything deploys nicely, but
when I try to list the contents of the table (using findAll()) then I get
this error:

com.evermind.server.rmi.OrionRemoteException: Database error: Closed
Statement: next; nested exception is: java.sql.SQLException: Closed
Statement: next

And I have no idea what to do. I know that the datasource works, because I
have used it for other purposes.

Thanks,
Bjarni