Subject | exception with multiple threads |
---|---|
Author | Stanislav Mironov |
Post date | 2004-05-28T10:34:08Z |
Hi All!
I occasionally get this exception while using JDBC from multiple threads.
java.lang.IllegalStateException: registerStatement called with no
transaction
at
org.firebirdsql.jca.FBManagedConnection.registerStatement(FBManagedConnection.java:851)
at
org.firebirdsql.jdbc.AbstractConnection.registerStatement(AbstractConnection.java:927)
at
org.firebirdsql.jdbc.FBStatementFetcher.<init>(FBStatementFetcher.java:67)
at org.firebirdsql.jdbc.FBResultSet.<init>(FBResultSet.java:120)
at
org.firebirdsql.jdbc.AbstractStatement.getResultSet(AbstractStatement.java:544)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.executeQuery(AbstractPreparedStatement.java:120)
at <my code>
<my code>:
ps = connection.prepareStatement(sql);
ps.setInt(1, ...); 2.. 3...
ps.executeQuery(); // <- here exception occurs
FB 1.5.0, JDBC 1.0.1
How to solve?
--
Stanislav Mironov
I occasionally get this exception while using JDBC from multiple threads.
java.lang.IllegalStateException: registerStatement called with no
transaction
at
org.firebirdsql.jca.FBManagedConnection.registerStatement(FBManagedConnection.java:851)
at
org.firebirdsql.jdbc.AbstractConnection.registerStatement(AbstractConnection.java:927)
at
org.firebirdsql.jdbc.FBStatementFetcher.<init>(FBStatementFetcher.java:67)
at org.firebirdsql.jdbc.FBResultSet.<init>(FBResultSet.java:120)
at
org.firebirdsql.jdbc.AbstractStatement.getResultSet(AbstractStatement.java:544)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.executeQuery(AbstractPreparedStatement.java:120)
at <my code>
<my code>:
ps = connection.prepareStatement(sql);
ps.setInt(1, ...); 2.. 3...
ps.executeQuery(); // <- here exception occurs
FB 1.5.0, JDBC 1.0.1
How to solve?
--
Stanislav Mironov