Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable change causes an exception in log #9

Open
zambrovski opened this issue Dec 6, 2021 · 0 comments
Open

Variable change causes an exception in log #9

zambrovski opened this issue Dec 6, 2021 · 0 comments
Labels
Type: bug Something isn't working
Milestone

Comments

@zambrovski
Copy link
Member

Steps to reproduce

  • camunda-bpm-taskpool version: 3.1.5
  • Camunda BPM version: 7.15
  • JDK version: 11
  • Operating system: any
  • Steps: Start standalone application

Copied from holunda-io/camunda-bpm-taskpool#460

Expected behaviour

  • No errors.

Actual behaviour

2021-10-13 15:04:22.513  INFO 77104 --- [           main] i.h.p.e.p.a.s.PrefillingConfiguration    : Minimal process instance threshold (1) reached, starting a process.
2021-10-13 15:04:23.659 ERROR 77104 --- [           main] .p.a.RequestApprovalProcessConfiguration : <--------- CUSTOM ERROR HANDLER REPORT --------->
2021-10-13 15:04:23.683 ERROR 77104 --- [           main] .p.a.RequestApprovalProcessConfiguration : SENDER-003: Sending command GenericCommandMessage{payload={ChangeProcessVariablesForExecutionCommand(sourceReference=ProcessReference(instanceId=15c0353d-2c26-11ec-85ce-024243b99c50, executionId=15c0353d-2c26-11ec-85ce-024243b99c50, definitionId=process_approve_request:1:159b4818-2c26-11ec-85ce-024243b99c50, definitionKey=process_approve_request, name=Request Approval, applicationName=example-process-approval, tenantId=null), variableChanges=[ProcessVariableCreate(variableInstanceId=1604b84e-2c26-11ec-85ce-024243b99c50, variableName=request, revision=0, scopeActivityInstanceId=15c0353d-2c26-11ec-85ce-024243b99c50, value=PrimitiveProcessVariableValue(value=50004f87-6b15-4861-b4dc-414673d3db0b))])}, metadata={}, messageIdentifier='e3a127a9-4b7a-4e05-a0b7-92ff288d6c06', commandName='io.holunda.camunda.taskpool.api.process.variable.ChangeProcessVariablesForExecutionCommand'} resulted in error

org.axonframework.eventsourcing.eventstore.EventStoreException: An event for aggregate [15c0353d-2c26-11ec-85ce-024243b99c50] at sequence [1] was already inserted
	at org.axonframework.eventsourcing.eventstore.AbstractEventStorageEngine.handlePersistenceException(AbstractEventStorageEngine.java:123) ~[axon-eventsourcing-4.5.3.jar:4.5.3]
	at org.axonframework.eventsourcing.eventstore.jpa.JpaEventStorageEngine.lambda$appendEvents$6(JpaEventStorageEngine.java:290) ~[axon-eventsourcing-4.5.3.jar:4.5.3]
	at org.axonframework.common.transaction.TransactionManager.executeInTransaction(TransactionManager.java:47) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.eventsourcing.eventstore.jpa.JpaEventStorageEngine.appendEvents(JpaEventStorageEngine.java:283) ~[axon-eventsourcing-4.5.3.jar:4.5.3]
	at org.axonframework.eventsourcing.eventstore.AbstractEventStorageEngine.appendEvents(AbstractEventStorageEngine.java:101) ~[axon-eventsourcing-4.5.3.jar:4.5.3]
	at org.axonframework.eventsourcing.eventstore.AbstractEventStore.prepareCommit(AbstractEventStore.java:63) ~[axon-eventsourcing-4.5.3.jar:4.5.3]
	at org.axonframework.eventhandling.AbstractEventBus.doWithEvents(AbstractEventBus.java:235) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.eventhandling.AbstractEventBus.lambda$null$8(AbstractEventBus.java:155) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.messaging.unitofwork.MessageProcessingContext.notifyHandlers(MessageProcessingContext.java:72) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.messaging.unitofwork.DefaultUnitOfWork.notifyHandlers(DefaultUnitOfWork.java:106) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.messaging.unitofwork.AbstractUnitOfWork.changePhase(AbstractUnitOfWork.java:222) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.messaging.unitofwork.AbstractUnitOfWork.commitAsRoot(AbstractUnitOfWork.java:83) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.messaging.unitofwork.AbstractUnitOfWork.commit(AbstractUnitOfWork.java:71) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.messaging.unitofwork.DefaultUnitOfWork.executeWithResult(DefaultUnitOfWork.java:92) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.commandhandling.SimpleCommandBus.handle(SimpleCommandBus.java:177) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.commandhandling.SimpleCommandBus.doDispatch(SimpleCommandBus.java:143) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.commandhandling.SimpleCommandBus.dispatch(SimpleCommandBus.java:111) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.commandhandling.gateway.AbstractCommandGateway.send(AbstractCommandGateway.java:75) ~[axon-messaging-4.5.3.jar:4.5.3]
	at org.axonframework.commandhandling.gateway.DefaultCommandGateway.send(DefaultCommandGateway.java:73) ~[axon-messaging-4.5.3.jar:4.5.3]
	at io.holunda.polyflow.taskpool.sender.gateway.AxonCommandListGateway.sendToGateway(AxonCommandListGateway.kt:31) ~[classes/:na]
	at io.holunda.polyflow.taskpool.sender.process.variable.TxAwareAccumulatingProcessVariableCommandSender.send(TxAwareAccumulatingProcessVariableCommandSender.kt:108) ~[classes/:na]
	at io.holunda.polyflow.taskpool.sender.process.variable.TxAwareAccumulatingProcessVariableCommandSender.access$send(TxAwareAccumulatingProcessVariableCommandSender.kt:19) ~[classes/:na]
	at io.holunda.polyflow.taskpool.sender.process.variable.TxAwareAccumulatingProcessVariableCommandSender$send$2.afterCommit(TxAwareAccumulatingProcessVariableCommandSender.kt:55) ~[classes/:na]
	at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:135) ~[spring-tx-5.3.6.jar:5.3.6]
	at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:123) ~[spring-tx-5.3.6.jar:5.3.6]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:945) ~[spring-tx-5.3.6.jar:5.3.6]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:782) ~[spring-tx-5.3.6.jar:5.3.6]
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711) ~[spring-tx-5.3.6.jar:5.3.6]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654) ~[spring-tx-5.3.6.jar:5.3.6]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407) ~[spring-tx-5.3.6.jar:5.3.6]
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.6.jar:5.3.6]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.6.jar:5.3.6]
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.6.jar:5.3.6]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692) ~[spring-aop-5.3.6.jar:5.3.6]
	at io.holunda.polyflow.example.process.approval.process.RequestApprovalProcessBean$$EnhancerBySpringCGLIB$$2a9cada5.startProcess(<generated>) ~[classes/:na]
	at io.holunda.polyflow.example.process.approval.process.RequestApprovalProcessBean.startProcess$default(RequestApprovalProcessBean.kt:43) ~[classes/:na]
	at io.holunda.polyflow.example.process.approval.schedule.PrefillingConfiguration.run(PrefillingConfiguration.kt:40) ~[classes/:na]
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:810) ~[spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:800) ~[spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:346) ~[spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1340) ~[spring-boot-2.4.5.jar:2.4.5]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329) ~[spring-boot-2.4.5.jar:2.4.5]
	at io.holunda.polyflow.example.process.approval.SingleNodeExampleProcessApplicationKt.main(SingleNodeExampleProcessApplication.kt:68) ~[classes/:na]
Caused by: javax.persistence.TransactionRequiredException: no transaction is in progress
	at org.hibernate.internal.AbstractSharedSessionContract.checkTransactionNeededForUpdateOperation(AbstractSharedSessionContract.java:422) ~[hibernate-core-5.4.30.Final.jar:5.4.30.Final]
	at org.hibernate.internal.SessionImpl.checkTransactionNeededForUpdateOperation(SessionImpl.java:3397) ~[hibernate-core-5.4.30.Final.jar:5.4.30.Final]
	at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1354) ~[hibernate-core-5.4.30.Final.jar:5.4.30.Final]
	at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1349) ~[hibernate-core-5.4.30.Final.jar:5.4.30.Final]
	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.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:311) ~[spring-orm-5.3.6.jar:5.3.6]
	at com.sun.proxy.$Proxy172.flush(Unknown Source) ~[na:na]
	at org.axonframework.eventsourcing.eventstore.jpa.JpaEventStorageEngine.lambda$appendEvents$6(JpaEventStorageEngine.java:287) ~[axon-eventsourcing-4.5.3.jar:4.5.3]
	... 41 common frames omitted
	
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant