Discussion:
[jboss-user] [jBPM] - jBPM 5.4 : original exception is swallowed when using LocalTaskService inside an EJB CMT
gonzalad
2013-02-19 11:12:35 UTC
Permalink
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

"jBPM 5.4 : original exception is swallowed when using LocalTaskService inside an EJB CMT"

To view the discussion, visit: https://community.jboss.org/message/798310#798310

--------------------------------------------------------------
Hello,

I'm using LocalTaskService inside an EJB CMT.

Problem is, whenever TaskService generates an error, it tries to rollback the transaction calling ut.rollback() instead of ut.setRollbackOnly().

So, the original exception is swallowed and instead I get

Caused by: java.lang.IllegalStateException: JBAS014160: Tx erroné pour cette chaîne : TransactionImple < ac, BasicAction: 0:ffff0affce14:-23020732:512359da:43 status: ActionStatus.ABORTED > attendu, mais avons null
  at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:80) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:302) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:188) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:42) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:181) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
  at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
  at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.3.Final.jar:7.1.3.Final]
  at com.natixis.odeon.process.SampleProcessService$$$view9.forward(Unknown Source) [classes:]
 



I think there's an error in org.jbpm.task.service.TaskServiceSession, lien 462, takeOverTransaction should be false when we're running inside an EJB CMT.

} catch (RuntimeException re) {
   
    // We may not be the tx owner -- but something has gone wrong.
    // ..which is why we make ourselves owner, and roll the tx back.
    boolean takeOverTransaction = true;
    tpm.rollBackTransaction(takeOverTransaction);
 
 
    doOperationInTransaction(new TransactedOperation() {
        public void doOperation() {
            task.getTaskData().setStatus(Status.Error);
        }
    });
 
 
    throw re;
}


I'll update this thread whenever I'll have more info.

Can someone confirm this is a bug in jBPM ?

Thanks
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798310#798310]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...