Subject GDS Exception: Cursor unknown
Author Rick DeBay
(Firebird 1.5.1 and Jaybird RC4)

I have a select that returns 102903 rows. I then loop through these
batching two sets of PreparedStatements, and execute and commit every
1000.
When calling rs.next() for record 1199 I get the following exception:

org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569. Dynamic
SQL Error

SQL error code = -504
Cursor unknown
at
org.firebirdsql.jdbc.FBStatementFetcher.fetch(FBStatementFetcher.java:19
8)
at
org.firebirdsql.jdbc.FBStatementFetcher.next(FBStatementFetcher.java:127
)
at org.firebirdsql.jdbc.FBResultSet.next(FBResultSet.java:208)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.firebirdsql.pool.ResultSetHandler.invoke(ResultSetHandler.java:70)
at $Proxy3.next(Unknown Source)
at
com.rxstrat.database.X_ConvertDates.main(X_ConvertDates.java:67)
at org.firebirdsql.gds.GDSException: Dynamic SQL Error
SQL error code = -504
Cursor unknown
at
org.firebirdsql.jgds.GDS_Impl.readStatusVector(GDS_Impl.java:1759)
at
org.firebirdsql.jgds.GDS_Impl.receiveResponse(GDS_Impl.java:1712)
at
org.firebirdsql.jgds.GDS_Impl.isc_dsql_fetch(GDS_Impl.java:1076)
at
org.firebirdsql.jca.FBManagedConnection.fetch(FBManagedConnection.java:8
05)
at
org.firebirdsql.jdbc.AbstractConnection.fetch(AbstractConnection.java:95
3)
at
org.firebirdsql.jdbc.FBStatementFetcher.fetch(FBStatementFetcher.java:19
2)
at
org.firebirdsql.jdbc.FBStatementFetcher.next(FBStatementFetcher.java:127
)
at org.firebirdsql.jdbc.FBResultSet.next(FBResultSet.java:208)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.firebirdsql.pool.ResultSetHandler.invoke(ResultSetHandler.java:70)
at $Proxy3.next(Unknown Source)
at
com.rxstrat.database.X_ConvertDates.main(X_ConvertDates.java:67)

Rick DeBay
Senior Software Developer
RxStrategies.net