no transaction for request

263 views
Skip to first unread message

amolna...@gmail.com

unread,
Jun 18, 2021, 4:13:00 AM6/18/21
to firebird-java

Hi Mark!

Rarely I get "no transaction for request" exception in logs.
What can cause these error? Can this happen because of statement cancel?

Full callstack
[ERROR] 2021.06.17 11:27:04,868 - hu.libra.commons.log.LogUtils - "ResourceThread 2 -
running"
Resource Exception. no transaction for request [SQLState:25000, ISC error code:335544363],
error code: 25000
Reason: no transaction for request [SQLState:25000, ISC error code:335544363]
(FBSQLException)

org.firebirdsql.jdbc.FBSQLException: Resource Exception. no transaction for request
[SQLState:25000, ISC error code:335544363], error code: 25000
Reason: no transaction for request [SQLState:25000, ISC error code:335544363]
at org.firebirdsql.jdbc.InternalTransactionCoordinator$AbstractTransactionCoordinator.internalRollb
ack(InternalTransactionCoordinator.java:271)
at org.firebirdsql.jdbc.InternalTransactionCoordinator$LocalTransactionCoordinator.rollback(Interna
lTransactionCoordinator.java:450)
at org.firebirdsql.jdbc.InternalTransactionCoordinator.rollback(InternalTransactionCoordinator.java
:166)
at org.firebirdsql.jdbc.FBConnection.rollback(FBConnection.java:532)
at org.apache.commons.dbcp2.DelegatingConnection.rollback(DelegatingConnection.java:473)
at org.apache.commons.dbcp2.DelegatingConnection.rollback(DelegatingConnection.java:473)
at hu.libra.commons.db.connection.AbstractConnectionWrapper.rollback(AbstractConnectionWrapper.java
:127)
at hu.libra.lrecore.resources.ConnectionResource.close(ConnectionResource.java:66)
at hu.libra.lrecore.resource.ResourceManager.releaseResource(ResourceManager.java:445)
at hu.libra.lrecore.resource.ResourceManager.access$600(ResourceManager.java:44)
at hu.libra.lrecore.resource.ResourceManager$ResourceWrapper.close(ResourceManager.java:139)
at hu.libra.lrecore.resource.ArrayResourceList.close(ArrayResourceList.java:29)
at hu.libra.lrecore.jobs.reportjob.ReportJob$ReportJobTask.runTask(ReportJob.java:1085)
at hu.libra.lrecore.scheduler.task.AbstractTask$ExecutorToRunnableFuture$1.call(AbstractTask.java:6
6)
at hu.libra.lrecore.scheduler.task.AbstractTask$ExecutorToRunnableFuture$1.call(AbstractTask.java:5
6)
at hu.libra.lrecore.process.AbstractProcess$1.run(AbstractProcess.java:206)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hu.libra.lrecore.resources.autocloseable.ExecutorWithThread$ExecutorThread.run(ExecutorWithThrea
d.java:67)
Caused by: java.sql.SQLException: no transaction for request [SQLState:25000, ISC error
code:335544363]
at org.firebirdsql.gds.ng.FbExceptionBuilder$Type$1.createSQLException(FbExceptionBuilder.java:532)
at org.firebirdsql.gds.ng.FbExceptionBuilder$ExceptionInformation.toSQLException(FbExceptionBuilder
.java:485)
at org.firebirdsql.gds.ng.FbExceptionBuilder.toSQLException(FbExceptionBuilder.java:221)
at org.firebirdsql.jca.FBManagedConnection.getGDSHelper(FBManagedConnection.java:206)
at org.firebirdsql.jca.FBLocalTransaction.inTransaction(FBLocalTransaction.java:97)
at org.firebirdsql.jdbc.InternalTransactionCoordinator$AbstractTransactionCoordinator.internalRollb
ack(InternalTransactionCoordinator.java:267)
... 18 more



Thank you!

Mark Rotteveel

unread,
Jun 18, 2021, 10:27:14 AM6/18/21
to firebi...@googlegroups.com
In general this exception means that Firebird received a request (e.g.
statement execution) that requires a transaction, but the provided
transaction no longer exists.

However, looking at the exception stacktrace, this is a situation where
the connection is already 'destroyed'. Jaybird then reuses this error
code (isc_req_no_trans), and it should probably use something else; it
already has a nice "TODO Right error code?". This can happen if a fatal
error occurred before this, causing Jaybird to forcibly close the
connection, however due to the way Jaybird performs this close, not all
parts of the connection are aware it is closed which causes this less
clear error to be thrown.

In theory, it could happen because of a statement cancel, but in general
that shouldn't produce a fatal error.

You probably need to check your logs for earlier exceptions with error
code isc_network_error = 335544721, isc_io_error = 335544344 or
isc_req_sync = 335544364

Mark
--
Mark Rotteveel

amolna...@gmail.com

unread,
Jul 6, 2021, 8:23:54 AM7/6/21
to firebird-java
Thanks Mark, I will check the logs next time.
Reply all
Reply to author
Forward
0 new messages