db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com>
Subject cannot invoke other java.sql.Clob
Date Tue, 22 Jul 2008 02:36:32 GMT
Hi all.

I have someone getting an error like this on the client driver v10.4.1.3.

> java.sql.SQLException: You cannot invoke other java.sql.Clob/java.sql.Blob methods after
calling the free() method or after the Blob/Clob's transaction has been committed or rolled
back.
> 	at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:46)
> 	at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:362)
> 	at org.apache.derby.client.am.Clob.length(Clob.java:239)
> 	at org.apache.derby.client.am.Cursor.getString(Cursor.java:1035)
> 	at org.apache.derby.client.am.ResultSet.getString(ResultSet.java:1069)
> 	at org.apache.derby.client.am.ResultSet.getString(ResultSet.java:1661)
> 	at (our code)

The column is a CLOB but we're accessing it as a string.

I've seen forum posts and such in the past where rs.next() would cause 
the blob to be unusable, but we're doing all the gets inside a method 
and not calling next until after the method exits.  Certainly no 
rollback is occurring, and I don't see an error either side of this 
error which would indicate a need to rollback.

I can't appear to reproduce the issue at all on my own computer of course.

Is it possible there is a bug in Derby itself which only occurs in some 
situations?  I mean, we're just calling getString(), and I wanted to 
assume that internally it would manage the blob correctly.

Daniel


-- 
Daniel Noll

Mime
View raw message