db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Øystein Grøvlen <Oystein.Grov...@Sun.COM>
Subject Re: SQLTransientConnectionException with BLOB reads
Date Sat, 18 Aug 2007 11:40:01 GMT
Arthur Blake wrote:
> Hello, I have been using Apache Derby 10.2.2.0 for a few months, and it 
> has been working quite well for me.
> 
> I upgrade to 10.3.1.4 just after the release came out, and I have been 
> testing it out with my application.
> 
> It seems to work fine, except when I read some BLOB fields from the 
> database, this Exception is thrown:
> 
> java.sql.SQLTransientConnectionException: No current connection.
>   at 
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>   at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>   at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
>   at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.EmbedBlob.checkValidity(Unknown Source)
>   at org.apache.derby.impl.jdbc.EmbedBlob.getBytes(Unknown Source)
> ......

Are you accessing the Blob after the Connection from which is was 
obtained has been closed?  As described in the release notes for 10.3, 
it now required that the Connection is still open in order to access the 
Blob.  In 10.2, small Blobs may be accessed after the connection is 
closed, but not larger Blobs.

Please, check whether the Connection should still be open when the 
failure occurs.  If not, is it possible for you to change your 
application to keep the connection open as long as needed?

--
Øystein

Mime
View raw message