[jboss-user] [JBoss jBPM] - Re: Caused by: javax.resource.ResourceException: Transaction

Randysv do-not-reply at jboss.com
Fri Jul 17 08:28:01 EDT 2009


My process definition is below.


  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="ACLUpdate">
  | 
  | 
  | 	<swimlane name="RequesterClerk"></swimlane>
  | 
  | 
  | 	<start-state name="ACLRequestStart">
  | 		<transition to="ACL Approval" name="ToAclApproval"></transition>
  | 		<event type="node-leave">
  | 			<action name="CheckForProcessVariables" class="us.secureall.workflow.handler.action.CheckForProcessVariablesAction"></action>
  | 		</event>
  | 	</start-state>
  | 
  | 
  | 	<task-node name="ACL Approval" create-tasks="true" async="true">
  | 		<task blocking="true" name="ApproveACL">
  | 			<assignment class="us.secureall.workflow.handler.assignment.ACLUpdateAssignmentHandler"></assignment> 
  | 			<timer duedate="5 seconds" transition='TimedOut'>
  |         		<action class="us.secureall.workflow.handler.action.ApproveACLTimeOutActionHandler">
  |         		</action>
  |       		</timer>
  | 		</task>
  | 		<transition to="ApprovalNotification" name="aclapproved"></transition>
  | 		<transition to="TimeOutNotification" name="TimedOut"></transition>
  | 	</task-node>
  | 
  | 	<state name="ApprovalNotification">
  | 		<transition to="ACLRequestEnd" name="ApprovalToEnd"></transition>
  | 	</state>
  | 
  | 	<state name="TimeOutNotification">
  | 		<transition to="ACLRequestEnd" name="TimeOutToEnd"></transition>
  | 	</state>
  | 
  | 
  | 	<end-state name="ACLRequestEnd"></end-state>
  | 
  | 
  | </process-definition>
  | 

The timer ejb fires successfully and my ApproveACLTimeOutActionHandler is called. But then I get the exception and the transition out of the Task Node does not happen.

Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57fd96:cdc8:4a5a8010:b3d status: ActionStatus.ABORT_ONLY >
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:370)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
... 70 more


Why is the transaction not active anymore? I don't see any exception in my code. I hardy do anything in my ApproveACLTimeOutActionHandler other than do a System.out. This seems to be a pretty common problem and it is probably JBoss' issue. A whole lot of people seem to have this issue, but there is no explanation anywhere.

This is the piece of jboss' code where it is checking if the transaction is active and throwing an exception if it is node

Transaction tx = tm.getTransaction();
  |          if (tx != null && TxUtils.isActive(tx) == false)
  |             throw new ResourceException("Transaction is not active: tx=" + tx);
  |          if (!interleaving)
  |             trackByTransaction = tx;
  | 

Please help if anybody has a fix for this issue.

TIA,
Randy

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244304#4244304

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244304



More information about the jboss-user mailing list