InvalidOperationException or BugCheckException bug code 10019.

By: Ben Matterson

Abstract: Possible solution for Java application exceptions thrown by InterClient.


Java program throws one or both of the following exceptions:
  • "interbase.interclient.InvalidOperationException: [interclient] Invalid operation on a closed result set."
  • "interbase.interclient.BugCheckException: [interclient] Please send mail to Refer to bug code 10019."

Possible Cause:

These errors can be caused by trying to share a database connection across threads. This is not allowed. If you do want to do this you will need use complex synchronization across the various threads. JDBC does allow using the connection pools across threads but this is a different module which rests over the JDBC driver and the functionality is not currently provided by InterClient.

Sharing a single database connection across multiple threads without any synchronization parameters, will cause race conditions where the resultset or the statement might be closed (or closing) on a connection which is being used by another thread for data access.

The solution is to not use the same database connection across the different threads, or single thread the sections of the code which lead to the above mentioned race conditions and conflict.


One way is to have each thread create a thread specific connection.

Another option would be to have a main thread create multiple connections to the database and then store them in array. The threads will have to be given a specific connection from this array to use.

Server Response from: ETNASC03