db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trejkaz (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-3862) "You cannot invoke other java.sql.Clob/java.sql.Blob methods" on calling Result#getString for Clob column
Date Wed, 03 Sep 2008 00:57:44 GMT
"You cannot invoke other java.sql.Clob/java.sql.Blob methods" on calling Result#getString for
Clob column
---------------------------------------------------------------------------------------------------------

                 Key: DERBY-3862
                 URL: https://issues.apache.org/jira/browse/DERBY-3862
             Project: Derby
          Issue Type: Bug
          Components: Network Client
    Affects Versions: 10.4.1.3
            Reporter: Trejkaz


I have seen this error a couple of times on the client driver v10.4.1.3 (server is also v10.4.1.3
if it matters):

    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)

DERBY-3583 notes the error message for the same usage but that is for multiple calls -- this
is happening on the *first* call to getString for that column.

Autocommit is off -- all access to the database in our code is funneled through one place,
we set it to false immediately after getting it from the pool and there are no other calls
to it.

I have looked at another place in our code where we are getting a Clob as a string and in
that place we are using the character stream and reading that to a string, and not closing
it, which in itself is suspicious but maybe there is a reason.  There is no comment saying
why we're not using getString, but it might be because of this issue.  Will be investigating
that lead some more shortly.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message