Subject Re: [Firebird-Java] Problem with multi-threaded update/query causing JDBC driver errors
Author Roman Rokytskyy
> We had some multi-threaded code running where both threads were using
> the same JDBC connection; if they ran SQL code at the same time,
> errors could occur. (The threads have since been changed to have their
> own JDBC connections.)

What kind of queries were executed in those threads? Only selects? Do
you run in auto-commit mode? If not, how do you commit the transactions?

> Sometimes the error was a NullPointerException, or in some cases "GDS
> Exception. 335544332. invalid transaction handle (expecting explicit
> transaction start)".

The NullPointerException is a consequence of executing the statement
without active transaction. It looks that one thread has finished the
transaction exactly between checking for transaction and statement
execution in another thread...