Subject Attempt to reclose a closed cursor
Author Ruslan Cheremin
Hi,

We use JBird in our application, and have strange exception sometimes
In code below

try {
pstmt.setInt(1, first);
pstmt.setInt(2, skip);
ResultSet rs = pstmt.executeQuery(); // <--
exception throws here
RowSetDynaClass res = new FBRowSetDynaClass(rs, LOWER_CASE);
rs.close();
conn.commit();
return res;
}
catch(SQLException ex) {
throw new DBException("Error in query", ex);
}

we get following error
......
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. Dynamic SQL
Error
SQL error code = -501
Attempt to reclose a closed cursor
at org.firebirdsql.jdbc.FBStatement.closeResultSet(FBStatement.java:887)
at
org.firebirdsql.jdbc.FBPreparedStatement.internalExecute(FBPreparedStatement
.java:419)
at
org.firebirdsql.jdbc.FBPreparedStatement.executeQuery(FBPreparedStatement.ja
va:101)
at
com.eastview.db.firebirdImpl.search.FirebirdSearcher.executeOffline(Firebird
Searcher.java:67)
... 31 more
It's hard to reproduce this error -- 7-8 query may finish succesfully, but
9-th throws exception.

We also had another errors -- like "You cannot getAutomcommit on an
unassociated closed connection"
or "java.lang.IllegalStateException -- registerStatement called with no
transaction" -- also in strange points
of code.

Any ideas?

Thanks,
Ruslan