JIRA 4.0 : Transaction Isolation Change exceptions with JBoss
This page last changed on Nov 01, 2007 by rosie@atlassian.com.
2007-09-26 08:14:31,033 INFO [STDOUT] 08:14:31,030 ERROR [SimpleWorkflowManager] An exception occurred org.ofbiz.core.entity.GenericTransactionException: Error occurred while starting transaction. (Cannot change transaction isolation level in the middle of a transaction.) at org.ofbiz.core.entity.TransactionUtil.beginLocalTransaction(TransactionUtil.java:276) at com.atlassian.core.ofbiz.util.CoreTransactionUtil.begin(CoreTransactionUtil.java:31) at com.atlassian.jira.workflow.SimpleWorkflowManager.doWorkflowAction(SimpleWorkflowManager.java:251) at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.progress(WorkflowTransitionUtilImpl.java:264) at com.atlassian.jira.web.action.workflow.SimpleWorkflowAction.doExecute(SimpleWorkflowAction.java:34) at webwork.action.ActionSupport.execute(ActionSupport.java:153) ... caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction. at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:765) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcTransactionIsolation(BaseWrapperManagedConnection.java:534) at org.jboss.resource.adapter.jdbc.WrappedConnection.setTransactionIsolation(WrappedConnection.java:390) at org.ofbiz.core.entity.TransactionUtil.beginLocalTransaction(TransactionUtil.java:262) at com.atlassian.core.ofbiz.util.CoreTransactionUtil.begin(CoreTransactionUtil.java:31) After much pain it appears that the datasource configuration had the following: <new-connection-sql>select 1</new-connection-sql> <check-valid-connection-sql>select 1</check-valid-connection-sql> Which for some reason seems to be being run within the same transaction as the client code - "fixing" the isolation level. I tried to raise a bug at jira.jboss.org or comment on this one (that was the only one I could find that seemed to be similar) but after a long and drawn out fight with the jboss.com registration system was unable to log in to it. Status: has not been reproduced and tested internally but has fixed problem for two customers. |
![]() |
Document generated by Confluence on Oct 06, 2009 00:26 |