Hi everyone,
My application is migrated from Activiti 5 to Flowable 6, for existing bpm processes, I got an error when create a timer that said: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'lockOwner' in 'class org.activiti5.engine.impl.persistence.entity.TimerJobEntity'
In org.activiti5.engine.impl.persistence.entity.TimerJobEntity, I see we have no lockOwner field, but in org\activiti\db\mapping\entity\TimerJob.xml the result mapper requires lockOwner
My questions:
Why we have the mismatch between the xml mapping and the entity?
And can I solve it by overriding the TimerJob.xml mapper to remove fields that are not existed in the corresponding TimerJobEntity entity, if yes how can I config to make the engine to use my new TimerJob.xml file?
@joram, thanks for your reply, I attach the full stack trace here, it happens when a timer is created or the timer is triggered
ERROR org.activiti.engine.impl.interceptor.CommandContext:169 {https-openssl-apr-20000-exec-10} - Error while closing command context org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property ‘lockOwner’ of ‘class org.activiti.engine.impl.persistence.entity.TimerJobEntity’ with value ‘timer-job-id’ Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named ‘lockOwner’ in ‘class org.activiti.engine.impl.persistence.entity.TimerJobEntity’ ### The error may exist in org/activiti/db/mapping/entity/TimerJob.xml ### The error may involve org.activiti.engine.impl.persistence.entity.TimerJobEntity.selectTimerJobsByExecutionId ### The error occurred while handling results ### SQL: select * from ACT_RU_TIMER_JOB J where J.EXECUTION_ID_ = ? ### Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property ‘lockOwner’ of ‘class org.activiti.engine.impl.persistence.entity.TimerJobEntity’ with value ‘timer-job-id’ Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named ‘lockOwner’ in ‘class org.activiti.engine.impl.persistence.entity.TimerJobEntity’
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ~[mybatis-3.5.3.jar:3.5.3]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149) ~[mybatis-3.5.3.jar:3.5.3]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[mybatis-3.5.3.jar:3.5.3]
at org.activiti.engine.impl.db.DbSqlSession.selectListWithRawParameter(DbSqlSession.java:384) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:375) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:370) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:347) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.persistence.entity.TimerJobEntityManager.findTimerJobsByExecutionId(TimerJobEntityManager.java:61) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.ensureTimerJobsInitialized(ExecutionEntity.java:1527) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.getTimerJobsInternal(ExecutionEntity.java:1532) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.getTimerJobs(ExecutionEntity.java:1537) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.dispatchJobCanceledEvents(BpmnActivityBehavior.java:91) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:61) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:43) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:44) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.signal(UserTaskActivityBehavior.java:233) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal(ExecutionEntity.java:444) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.persistence.entity.TaskEntity.complete(TaskEntity.java:209) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:65) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:23) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:59) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24) ~[flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:59) [flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:49) [flowable5-spring-6.5.0.jar:?]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) [spring-tx-5.3.8.jar:5.3.8]
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:46) [flowable5-spring-6.5.0.jar:?]
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) [flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51) [flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:46) [flowable5-engine-6.5.0.jar:6.5.0]
at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:213) [flowable5-engine-6.5.0.jar:6.5.0]
at org.flowable.compatibility.DefaultFlowable5CompatibilityHandler.completeTask(DefaultFlowable5CompatibilityHandler.java:591) [flowable5-compatibility-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:56) [flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:26) [flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:58) [flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:51) [flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:93) [flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:72) [flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:56) [flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:25) [flowable-engine-6.5.0.jar:6.5.0]
at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) [flowable-engine-common-6.5.0.jar:6.5.0]
at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:72) [flowable-engine-common-6.5.0.jar:6.5.0]
at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:51) [flowable-spring-common-6.5.0.jar:6.5.0]
at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) [flowable-engine-common-6.5.0.jar:6.5.0]
at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) [flowable-engine-common-6.5.0.jar:6.5.0]
at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51) [flowable-engine-common-6.5.0.jar:6.5.0]
at org.flowable.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:213) [flowable-engine-6.5.0.jar:6.5.0]