[jboss-user] [jBPM] - Re: Concurrency problems with JBPM 5.4

Jon Kranes do-not-reply at jboss.com
Tue Jul 23 10:28:53 EDT 2013


Jon Kranes [https://community.jboss.org/people/jkranes] created the discussion

"Re: Concurrency problems with JBPM 5.4"

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

--------------------------------------------------------------
Thomas, thanks for your suggestion.

Unfortunately even I do not use Spring transactions, I still get errors when running multiple threads.

The exception stack (using JBPM transactions without the Spring @Transactional) is:

10:18:46,495 WARN  [com.arjuna.ats.arjuna] (SimpleAsyncTaskExecutor-2) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffff0a900c53:-5f136b43:51ee90a2:32b, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization at 785e9b33 >: javax.persistence.PersistenceException: error during managed flush
          at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1486) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
          at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
          at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
          at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
          at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
          at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
          at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
          at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
          at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
          at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
          at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:167)
          at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1011) [spring-tx-3.2.2.RELEASE.jar:3.2.2.RELEASE]
          at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755) [spring-tx-3.2.2.RELEASE.jar:3.2.2.RELEASE]
          at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724) [spring-tx-3.2.2.RELEASE.jar:3.2.2.RELEASE]
          at org.drools.container.spring.beans.persistence.DroolsSpringTransactionManager.commit(DroolsSpringTransactionManager.java:65) [drools-spring-5.5.0.Final.jar:5.5.0.Final]
          at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:155) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_25]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_25]
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_25]
          at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_25]
          at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:128) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
          at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:66) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
          at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122) [knowledge-api-5.5.0.Final.jar:5.5.0.Final]
          at org.mitre.irs.eda.bpm.jbpm.KnowledgeSessionFactory.createSession(KnowledgeSessionFactory.java:70) [classes:]
          at org.mitre.irs.eda.bpm.jbpm.KnowledgeSessionFactory.createKnowledgeSession(KnowledgeSessionFactory.java:57) [classes:]
          at org.mitre.irs.eda.bpm.service.EventServiceImpl.startProcess(EventServiceImpl.java:44) [classes:]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_25]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_25]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_25]
          at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_25]
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) [spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
          at com.sun.proxy.$Proxy106.startProcess(Unknown Source)
          at org.mitre.irs.eda.bpm.listener.StartProcessListener.onMessage(StartProcessListener.java:46) [classes:]
          at org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter.onMessage(MessageListenerAdapter.java:328) [spring-rabbit-1.1.4.RELEASE.jar:]
          at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:546) [spring-rabbit-1.1.4.RELEASE.jar:]
          at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:472) [spring-rabbit-1.1.4.RELEASE.jar:]
          at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:58) [spring-rabbit-1.1.4.RELEASE.jar:]
          at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:107) [spring-rabbit-1.1.4.RELEASE.jar:]
          at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:608) [spring-rabbit-1.1.4.RELEASE.jar:]
          at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:454) [spring-rabbit-1.1.4.RELEASE.jar:]
          at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:471) [spring-rabbit-1.1.4.RELEASE.jar:]
          at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:455) [spring-rabbit-1.1.4.RELEASE.jar:]
          at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$300(SimpleMessageListenerContainer.java:58) [spring-rabbit-1.1.4.RELEASE.jar:]
          at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:548) [spring-rabbit-1.1.4.RELEASE.jar:]
          at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: java.lang.NullPointerException
          at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:148) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
          at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:88) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
          at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
          at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1081) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
          at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:315) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
          at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
          ... 44 more
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130723/11cf8afe/attachment-0001.html 


More information about the jboss-user mailing list