Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle JDBC driver exception "Stream has already been closed"
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