You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a really strange behaviour, we have this process:
When I cancel the Process, while having just InMemoryBus/Store, the following error occurs. (Funny is, when using axon server, all works as expected)
I've already started a branch where I've provided a sample process and a test. (Sadly the test works, but ist just a TaskCollector Test, so maybe the wrong point for the test)
java.lang.IllegalStateException: It is not allowed to publish events when the root Unit of Work has already been committed.
at org.axonframework.common.Assert.state(Assert.java:44) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.AbstractEventBus.publish(AbstractEventBus.java:122) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.EventBus.publish(EventBus.java:51) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.publishOnEventBus(AnnotatedAggregate.java:389) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.eventsourcing.EventSourcedAggregate.publishOnEventBus(EventSourcedAggregate.java:266) ~[axon-eventsourcing-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.publish(AnnotatedAggregate.java:379) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.eventsourcing.EventSourcedAggregate.publish(EventSourcedAggregate.java:253) ~[axon-eventsourcing-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.doApply(AnnotatedAggregate.java:450) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.eventsourcing.EventSourcedAggregate.doApply(EventSourcedAggregate.java:247) ~[axon-eventsourcing-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.AggregateLifecycle.apply(AggregateLifecycle.java:62) ~[axon-modelling-4.3.1.jar:4.3.1]
at io.holunda.camunda.taskpool.core.task.TaskAggregate.delete(TaskAggregate.kt:344) ~[camunda-bpm-taskpool-core-2.0.7.jar:2.0.7]
at io.holunda.camunda.taskpool.core.task.TaskAggregate.handle(TaskAggregate.kt:86) ~[camunda-bpm-taskpool-core-2.0.7.jar:2.0.7]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.axonframework.messaging.annotation.AnnotatedMessageHandlingMember.handle(AnnotatedMessageHandlingMember.java:132) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.annotation.WrappedMessageHandlingMember.handle(WrappedMessageHandlingMember.java:61) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.handle(AnnotatedAggregate.java:424) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.lambda$handle$3(AnnotatedAggregate.java:399) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.messaging.Scope.executeWithResult(Scope.java:111) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.handle(AnnotatedAggregate.java:406) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.LockAwareAggregate.handle(LockAwareAggregate.java:82) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler$AggregateCommandHandler.handle(AggregateAnnotationCommandHandler.java:455) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler$AggregateCommandHandler.handle(AggregateAnnotationCommandHandler.java:444) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler.handle(AggregateAnnotationCommandHandler.java:171) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler.handle(AggregateAnnotationCommandHandler.java:59) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.messaging.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:57) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.interceptors.CorrelationDataInterceptor.handle(CorrelationDataInterceptor.java:65) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:55) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.DefaultUnitOfWork.executeWithResult(DefaultUnitOfWork.java:74) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.commandhandling.SimpleCommandBus.handle(SimpleCommandBus.java:177) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.commandhandling.SimpleCommandBus.doDispatch(SimpleCommandBus.java:143) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.commandhandling.SimpleCommandBus.dispatch(SimpleCommandBus.java:111) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.commandhandling.gateway.AbstractCommandGateway.send(AbstractCommandGateway.java:75) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.commandhandling.gateway.DefaultCommandGateway.send(DefaultCommandGateway.java:73) ~[axon-messaging-4.3.1.jar:4.3.1]
at io.holunda.camunda.taskpool.sender.gateway.AxonCommandListGateway.sendToGateway(AxonCommandListGateway.kt:34) ~[camunda-bpm-taskpool-collector-2.0.7.jar:2.0.7]
at io.holunda.camunda.taskpool.sender.TxAwareAccumulatingCommandSender.send(TxAwareAccumulatingCommandSender.kt:80) ~[camunda-bpm-taskpool-collector-2.0.7.jar:2.0.7]
at io.holunda.camunda.taskpool.sender.TxAwareAccumulatingCommandSender.access$send(TxAwareAccumulatingCommandSender.kt:14) ~[camunda-bpm-taskpool-collector-2.0.7.jar:2.0.7]
at io.holunda.camunda.taskpool.sender.TxAwareAccumulatingCommandSender$send$2.afterCommit(TxAwareAccumulatingCommandSender.kt:53) ~[camunda-bpm-taskpool-collector-2.0.7.jar:2.0.7]
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:134) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:122) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:946) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:783) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:712) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.axonframework.spring.messaging.unitofwork.SpringTransactionManager.commitTransaction(SpringTransactionManager.java:80) ~[axon-spring-4.3.1.jar:4.3.1]
at org.axonframework.spring.messaging.unitofwork.SpringTransactionManager$1.commit(SpringTransactionManager.java:63) ~[axon-spring-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.UnitOfWork.lambda$attachTransaction$0(UnitOfWork.java:273) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.MessageProcessingContext.notifyHandlers(MessageProcessingContext.java:71) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.BatchingUnitOfWork.lambda$notifyHandlers$2(BatchingUnitOfWork.java:155) ~[axon-messaging-4.3.1.jar:4.3.1]
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133) ~[na:na]
at org.axonframework.messaging.unitofwork.BatchingUnitOfWork.notifyHandlers(BatchingUnitOfWork.java:155) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.AbstractUnitOfWork.changePhase(AbstractUnitOfWork.java:222) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.AbstractUnitOfWork.commitAsRoot(AbstractUnitOfWork.java:83) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.AbstractUnitOfWork.commit(AbstractUnitOfWork.java:71) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.BatchingUnitOfWork.executeWithResult(BatchingUnitOfWork.java:111) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.AbstractEventProcessor.processInUnitOfWork(AbstractEventProcessor.java:159) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.TrackingEventProcessor.processBatch(TrackingEventProcessor.java:438) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.TrackingEventProcessor.processingLoop(TrackingEventProcessor.java:301) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.TrackingEventProcessor$TrackingSegmentWorker.run(TrackingEventProcessor.java:1161) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.TrackingEventProcessor$WorkerLauncher.run(TrackingEventProcessor.java:1276) ~[axon-messaging-4.3.1.jar:4.3.1]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]`
The text was updated successfully, but these errors were encountered:
I've a really strange behaviour, we have this process:
When I cancel the Process, while having just InMemoryBus/Store, the following error occurs. (Funny is, when using axon server, all works as expected)
I've already started a branch where I've provided a sample process and a test. (Sadly the test works, but ist just a TaskCollector Test, so maybe the wrong point for the test)
`2020-09-08 11:45:26.592 ERROR 12621 --- [ATING_ERRORS]-0] i.h.c.taskpool.sender.CommandSender : SENDER-006: Sending command GenericCommandMessage{payload={DeleteTaskCommand(id=016cdf77-f1b8-11ea-908b-de0799e4cb74, order=-1, eventName=delete, deleteReason=deleted)}, metadata={'traceId'->'2a2a6d22-d736-4a54-b1f6-e519813fc8d3', 'correlationId'->'2a2a6d22-d736-4a54-b1f6-e519813fc8d3'}, messageIdentifier='fcf3ce06-9ca6-473d-9a02-c0dff0ba30a3', commandName='io.holunda.camunda.taskpool.api.task.DeleteTaskCommand'} resulted in error
java.lang.IllegalStateException: It is not allowed to publish events when the root Unit of Work has already been committed.
at org.axonframework.common.Assert.state(Assert.java:44) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.AbstractEventBus.publish(AbstractEventBus.java:122) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.EventBus.publish(EventBus.java:51) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.publishOnEventBus(AnnotatedAggregate.java:389) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.eventsourcing.EventSourcedAggregate.publishOnEventBus(EventSourcedAggregate.java:266) ~[axon-eventsourcing-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.publish(AnnotatedAggregate.java:379) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.eventsourcing.EventSourcedAggregate.publish(EventSourcedAggregate.java:253) ~[axon-eventsourcing-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.doApply(AnnotatedAggregate.java:450) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.eventsourcing.EventSourcedAggregate.doApply(EventSourcedAggregate.java:247) ~[axon-eventsourcing-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.AggregateLifecycle.apply(AggregateLifecycle.java:62) ~[axon-modelling-4.3.1.jar:4.3.1]
at io.holunda.camunda.taskpool.core.task.TaskAggregate.delete(TaskAggregate.kt:344) ~[camunda-bpm-taskpool-core-2.0.7.jar:2.0.7]
at io.holunda.camunda.taskpool.core.task.TaskAggregate.handle(TaskAggregate.kt:86) ~[camunda-bpm-taskpool-core-2.0.7.jar:2.0.7]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.axonframework.messaging.annotation.AnnotatedMessageHandlingMember.handle(AnnotatedMessageHandlingMember.java:132) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.annotation.WrappedMessageHandlingMember.handle(WrappedMessageHandlingMember.java:61) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.handle(AnnotatedAggregate.java:424) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.lambda$handle$3(AnnotatedAggregate.java:399) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.messaging.Scope.executeWithResult(Scope.java:111) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.inspection.AnnotatedAggregate.handle(AnnotatedAggregate.java:406) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.LockAwareAggregate.handle(LockAwareAggregate.java:82) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler$AggregateCommandHandler.handle(AggregateAnnotationCommandHandler.java:455) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler$AggregateCommandHandler.handle(AggregateAnnotationCommandHandler.java:444) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler.handle(AggregateAnnotationCommandHandler.java:171) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.modelling.command.AggregateAnnotationCommandHandler.handle(AggregateAnnotationCommandHandler.java:59) ~[axon-modelling-4.3.1.jar:4.3.1]
at org.axonframework.messaging.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:57) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.interceptors.CorrelationDataInterceptor.handle(CorrelationDataInterceptor.java:65) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:55) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.DefaultUnitOfWork.executeWithResult(DefaultUnitOfWork.java:74) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.commandhandling.SimpleCommandBus.handle(SimpleCommandBus.java:177) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.commandhandling.SimpleCommandBus.doDispatch(SimpleCommandBus.java:143) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.commandhandling.SimpleCommandBus.dispatch(SimpleCommandBus.java:111) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.commandhandling.gateway.AbstractCommandGateway.send(AbstractCommandGateway.java:75) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.commandhandling.gateway.DefaultCommandGateway.send(DefaultCommandGateway.java:73) ~[axon-messaging-4.3.1.jar:4.3.1]
at io.holunda.camunda.taskpool.sender.gateway.AxonCommandListGateway.sendToGateway(AxonCommandListGateway.kt:34) ~[camunda-bpm-taskpool-collector-2.0.7.jar:2.0.7]
at io.holunda.camunda.taskpool.sender.TxAwareAccumulatingCommandSender.send(TxAwareAccumulatingCommandSender.kt:80) ~[camunda-bpm-taskpool-collector-2.0.7.jar:2.0.7]
at io.holunda.camunda.taskpool.sender.TxAwareAccumulatingCommandSender.access$send(TxAwareAccumulatingCommandSender.kt:14) ~[camunda-bpm-taskpool-collector-2.0.7.jar:2.0.7]
at io.holunda.camunda.taskpool.sender.TxAwareAccumulatingCommandSender$send$2.afterCommit(TxAwareAccumulatingCommandSender.kt:53) ~[camunda-bpm-taskpool-collector-2.0.7.jar:2.0.7]
at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:134) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:122) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:946) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:783) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:712) ~[spring-tx-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.axonframework.spring.messaging.unitofwork.SpringTransactionManager.commitTransaction(SpringTransactionManager.java:80) ~[axon-spring-4.3.1.jar:4.3.1]
at org.axonframework.spring.messaging.unitofwork.SpringTransactionManager$1.commit(SpringTransactionManager.java:63) ~[axon-spring-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.UnitOfWork.lambda$attachTransaction$0(UnitOfWork.java:273) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.MessageProcessingContext.notifyHandlers(MessageProcessingContext.java:71) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.BatchingUnitOfWork.lambda$notifyHandlers$2(BatchingUnitOfWork.java:155) ~[axon-messaging-4.3.1.jar:4.3.1]
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133) ~[na:na]
at org.axonframework.messaging.unitofwork.BatchingUnitOfWork.notifyHandlers(BatchingUnitOfWork.java:155) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.AbstractUnitOfWork.changePhase(AbstractUnitOfWork.java:222) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.AbstractUnitOfWork.commitAsRoot(AbstractUnitOfWork.java:83) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.AbstractUnitOfWork.commit(AbstractUnitOfWork.java:71) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.messaging.unitofwork.BatchingUnitOfWork.executeWithResult(BatchingUnitOfWork.java:111) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.AbstractEventProcessor.processInUnitOfWork(AbstractEventProcessor.java:159) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.TrackingEventProcessor.processBatch(TrackingEventProcessor.java:438) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.TrackingEventProcessor.processingLoop(TrackingEventProcessor.java:301) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.TrackingEventProcessor$TrackingSegmentWorker.run(TrackingEventProcessor.java:1161) ~[axon-messaging-4.3.1.jar:4.3.1]
at org.axonframework.eventhandling.TrackingEventProcessor$WorkerLauncher.run(TrackingEventProcessor.java:1276) ~[axon-messaging-4.3.1.jar:4.3.1]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]`
The text was updated successfully, but these errors were encountered: