Subject SQL_STATE_INVALID_TRANSACTION_STATE in clustered JBoss
Author Geert Pante
Hi all, I'm using JBoss4.0.3sp1 with jaybird's firebirdsql.rar version
1.5.5JDK_1.4, combined with spring 1.2.6 and hibernate 3.0.5, on Sun
JDK 1.5.0_06 for WinXP.

After a little configuration, transactions are working great in my
application, with spring's thread bounded transactions and hibernate
sessions.

I have also written a service that, when a user's http session is
invalidated, updates a record in my firebird database. This service
works in a simple environment, but not in a clustered environment,
even when there is only one server in the cluster...

Now, why do I ask this on this list, it's because the root exception
seems to be an FBSQLException with code 25S01, which I found
translates to SQL_STATE_INVALID_TRANSACTION_STATE. Does this ring a
bell, anyone?

Should I try to update firebird/jaybird/hibernate? Suggestions for
debugging? Should I submit it as a bug report?

Thanks in advance, Geert.


2006-02-22 17:08:50,640 ERROR [org.apache.catalina.core.ContainerBase.
[jboss.web].[secure.qaweb.barco.com].[/server]] standardSession.
attributeEvent
org.springframework.transaction.CannotCreateTransactionException:
Could not open Hibernate Session for transaction; nested exception is
org.hibernate.TransactionException: JDBC begin failed:
org.hibernate.TransactionException: JDBC begin failed:
at org.hibernate.transaction.JDBCTransaction.
begin(JDBCTransaction.java:58)
at org.hibernate.transaction.JDBCTransactionFactory.
beginTransaction(JDBCTransactionFactory.java:24)
at org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.
java:271)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.
java:1079)
at org.springframework.orm.hibernate3.
HibernateTransactionManager.doBegin(HibernateTransactionManager.java:
520)
at org.springframework.transaction.support.
AbstractPlatformTransactionManager.
getTransaction(AbstractPlatformTransactionManager.java:282)
at org.springframework.transaction.support.TransactionTemplate.
execute(TransactionTemplate.java:111)
at com.acme.utils.AbstractHibernateTransactionRunnable.
run(AbstractHibernateTransactionRunnable.java:53)
at com.acme.webctrl.
AcegiApplicationListener.timeoutEvent(AcegiApplicationListener.java:
44)
at com.acme.webctrl.J2EEWebAppListener.
attributeRemoved(J2EEWebAppListener.java:59)
at org.jboss.web.tomcat.tc5.session.ClusteredSession.
removeAttributeInternal(ClusteredSession.java:558)
at org.jboss.web.tomcat.tc5.session.ClusteredSession.
expire(ClusteredSession.java:418)
at org.jboss.web.tomcat.tc5.session.ClusteredSession.
expire(ClusteredSession.java:345)
at org.apache.catalina.session.StandardSession.
isValid(StandardSession.java:567)
at org.jboss.web.tomcat.tc5.session.JBossCacheManager.
processExpires(JBossCacheManager.java:683)
at org.jboss.web.tomcat.tc5.session.JBossManager.
backgroundProcess(JBossManager.java:662)
at org.apache.catalina.core.ContainerBase.
backgroundProcess(ContainerBase.java:1283)
at org.apache.catalina.core.
ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1568)
at org.apache.catalina.core.
ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1577)
at org.apache.catalina.core.
ContainerBase$ContainerBackgroundProcessor.
processChildren(ContainerBase.java:1577)
at org.apache.catalina.core.
ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:
1557)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.firebirdsql.jdbc.FBSQLException: Resource Exception. No
local transaction active: can't commit, error code: 25S01
at org.firebirdsql.jdbc.AbstractConnection.
setAutoCommit(AbstractConnection.java:328)
at org.hibernate.transaction.JDBCTransaction.
begin(JDBCTransaction.java:53)