java.lang.NullPointerException when leaving parallel multiinstance-subprocess

241 views
Skip to first unread message

m.radli...@gmail.com

unread,
Jan 9, 2014, 8:40:56 AM1/9/14
to camunda-...@googlegroups.com
Hi,

I'm getting a NPE which is not really reproducable (at least not for me). It seems, that the ParallelMultiInstanceBehavior.getLoopVariable() returns a null-value Integer object which is then cast to a primitive int in the ParallelMultiInstanceBehavior.leave() method.

Do you guys have any idea which state in the multiinstance process could cause this exception and how I could avoid that?

Thank you very much!

Cheers,
Michi

Last but not least, the stacktrace:

java.lang.NullPointerException: null
at org.camunda.bpm.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior.leave(ParallelMultiInstanceBehavior.java:101) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.lastExecutionEnded(MultiInstanceActivityBehavior.java:133) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationActivityEnd.eventNotificationsCompleted(AtomicOperationActivityEnd.java:76) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:63) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.end(ExecutionEntity.java:406) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.bpmn.behavior.NoneEndEventActivityBehavior.execute(NoneEndEventActivityBehavior.java:24) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:55) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:63) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:54) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:69) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:58) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:117) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:63) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:438) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.bpmn.behavior.ExclusiveGatewayActivityBehavior.leave(ExclusiveGatewayActivityBehavior.java:74) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:55) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:63) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:54) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:69) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:58) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:117) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:63) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:121) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext$1.call(CommandContext.java:105) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext$1.call(CommandContext.java:103) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.application.AbstractProcessApplication.execute(AbstractProcessApplication.java:100) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.context.Context.executeWithinProcessApplication(Context.java:138) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:103) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:609) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:600) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:438) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:102) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:51) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.bpmn.behavior.ReceiveTaskActivityBehavior.signal(ReceiveTaskActivityBehavior.java:35) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:421) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.cmd.SignalCmd.execute(SignalCmd.java:71) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32) ~[camunda-engine-7.0.0-Final.jar:na]
at org.camunda.bpm.engine.impl.RuntimeServiceImpl.signal(RuntimeServiceImpl.java:202) ~[camunda-engine-7.0.0-Final.jar:na]
at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_40]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_40]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) [spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) [spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) [spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [spring-aop-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at com.sun.proxy.$Proxy32.onMessage(Unknown Source) [na:na]
at org.springframework.jms.listener.adapter.MessageListenerAdapter.onMessage(MessageListenerAdapter.java:339) [spring-jms-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:537) [spring-jms-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:497) [spring-jms-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468) [spring-jms-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325) [spring-jms-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:243) [spring-jms-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1103) [spring-jms-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1095) [spring-jms-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:992) [spring-jms-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at java.lang.Thread.run(Thread.java:724) [na:1.7.0_40]

Nico Rehwaldt

unread,
Jan 9, 2014, 10:58:53 AM1/9/14
to camunda-...@googlegroups.com
Hi Michael, 

not really reproducable does not sound like something that it fun to debug. 

Could you attach a example process, mini-setup or (best) a test case that fails at some point?

Based on the stack trace this may be an engine bug and we would like to try to reproduce it. 


Regards, 

Nico

Michael Radlingmaier

unread,
Jan 13, 2014, 5:37:02 AM1/13/14
to camunda-...@googlegroups.com
Hi Nico,

I tried to reproduce the error, but as expected, without success. Nevertheless, I attached the Unit test and the bpmn.
Another thing: do you know why this testcase fails with an OptimisticLockingException as soon as I increase the maximum number of parallel signals to > 18 (line 50) --> OptimisticLockingException is caught explicitely in line 60 and this works fine for threadpools with size <=18?
Has this something to do with the DB-connection pool size?

Thanks,
Cheers,
  Michael
MultiInstanceReceiveTaskTest.testParallelReceiveTasksBasedOnCollection.bpmn20.xml
MultiInstanceReceiveTaskTest.java

Roman Smirnov

unread,
Jan 15, 2014, 5:19:58 AM1/15/14
to camunda-...@googlegroups.com
Hi Michael,

the OptimisticLockingException occurs because you start concurrent threads to signal an execution and the threads tries to update the same parent execution concurrently. So, if you would signal in a single thread for each execution the OptimisticLockingException would not occur.

I am not able to reproduce the NullPointerException, but I created a Issue CAM-1721 to throw a more specific exception, when the loop variable is null in some situations.

Cheers,
Roman

Michael Radlingmaier

unread,
Jan 15, 2014, 9:44:02 AM1/15/14
to camunda-...@googlegroups.com
Hi Roman,

I'm catching the OptimisiticLockingException and then do a retry on the signal (after a short sleeptime) - I think that this is the only way to signal multiple executions to the engine in parallel (if the executions are part of the same process instance).
Therefore I'm a little bit confused why the test fails with this exception (should be caught and therefore not failing).

Thanks for the Jira item, I think that this will definitely help to take care of this problem in my application.

Cheers,
 Michael
Reply all
Reply to author
Forward
0 new messages