Subject RE: GDS Exception: Cursor unknown
Author Rick DeBay
Increasing batch/commit threshold to 2000, the exception was thrown on
record 2399.
Increasing batch/commit threshold to 3000, the exception was thrown on
record 3199.
Reducing batch/commit threshold to 200, the exception was thrown on
record 199.
Reducing batch/commit threshold to 199, the exception was thrown on
record 400.
Reducing batch/commit threshold to 150, the exception was thrown on
record 400.

Leaving autoCommit set to true and not explicitly committing after the
two executeBatch() statements solved the problem, I can run with 1000 in
a batch with no problem.

FYI, same connection handles the query Statement and both update
PreparedStatements. They all are against different tables, with no
dependencies between them.

-----Original Message-----
From: Rick DeBay
Sent: Tuesday, July 27, 2004 3:13 PM
To: Firebird-Java@yahoogroups.com
Subject: GDS Exception: Cursor unknown

(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