Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle JDBC driver exception "Stream has already been closed"

Re: Oracle JDBC driver exception "Stream has already been closed"

From: Thomas Kellerer <IQEWDSUVEDDF_at_spammotel.com>
Date: Wed, 17 Mar 2004 09:27:09 +0100
Message-ID: <c3924t$25dsh5$1@ID-13919.news.uni-berlin.de>


On 17.03.2004 01:42 Anton Nemychenkov wrote:

> Hello,
>
> We get this exception when trying to read data from column of type
> LONG (using OracleResultSet.getCharacterStream()). I've searched
> newsgroups and read Oracle documentation on the subject. We seem to
> do everything according to the doc: the order of columns is correct
> (we read values from ResultSet in the same order as they appear in
> select list) and we try to access the stream right after it was
> fetched (prefetch size is explicitly set to 1). Does anyone know what
> else might be wrong?
>
> Thank you in advance.
>
> Anton.

Hello,

I have encountered this problem, when I executed another statement on the same connection while the initial result set/statement was not yet closed. In my case it was roughly the following sequence:

statement1 = connection.createStatement(); result1 = statement1.executeQuery(...);

statement2 = connection.createStatement(); result2 = statement2.executeQuery(...)

Now, when you process result1 you'll get the error message when trying to read a LONG column (in my case I was using getObject() and not getCharacterStream())

Maybe you are doing something similar.

Regards
Thomas Received on Wed Mar 17 2004 - 02:27:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US