09-Feb-2022 00:53:13.168 SEVERE [http-nio-8080-exec-4] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: An exception occurred in the persistence layer. Please check the server logs for a detailed message and the entire exception stack trace. org.camunda.bpm.engine.ProcessEngineException: An exception occurred in the persistence layer. Please check the server logs for a detailed message and the entire exception stack trace. at org.camunda.bpm.engine.impl.util.ExceptionUtil.wrapPersistenceException(ExceptionUtil.java:263) at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.flushDbOperationException(EnginePersistenceLogger.java:132) at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:364) at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:323) at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:295) at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:272) at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:188) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:119) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:179) at org.camunda.bpm.engine.rest.sub.task.impl.TaskResourceImpl.complete(TaskResourceImpl.java:117) at jdk.internal.reflect.GeneratedMethodAccessor639.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:138) at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:546) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:435) at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:396) at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:398) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:365) at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:150) at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:110) at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:141) at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:104) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:440) at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:229) at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:135) at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358) at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:138) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:215) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:245) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:61) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.camunda.bpm.engine.rest.security.auth.ProcessEngineAuthenticationFilter.doFilter(ProcessEngineAuthenticationFilter.java:155) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:45) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.camunda.bpm.engine.rest.filter.EmptyBodyFilter.doFilter(EmptyBodyFilter.java:99) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:887) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1684) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03004 Exception while executing Database Operation 'INSERT TaskEntity[83305528-8929-11ec-b4f2-0a580a82147f]' with message ' ### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.insertTask (batch index #8) failed. 7 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_RU_TASK ( ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, CASE_EXECUTION_ID_, CASE_INST_ID_, CASE_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, FOLLOW_UP_DATE_, SUSPENSION_STATE_, TENANT_ID_, REV_ ) values ( '83305528-8929-11ec-b4f2-0a580a82147f', 'Проверка', NULL, NULL, 50, '2022-02-09 00:53:12.929000+03'::timestamp, NULL, 'SAPERP', NULL, '82ddc84a-8929-11ec-b4f2-0a580a82147f', 'c785297d-835e-11ec-9cdd-0a580a821443', 'businessTripExpenseReport:5:de36fe6d-597e-11ec-a80e-0a580a8308f0', NULL, NULL, NULL, 'Verification', NULL, NULL, 1, NULL, 1 ) was aborted: ERROR: insert or update on table "act_ru_task" violates foreign key constraint "act_fk_task_exe" Detail: Key (execution_id_)=(82ddc84a-8929-11ec-b4f2-0a580a82147f) is not present in table "act_ru_execution". Call getNextException to see other errors in the batch. ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.insertTask (batch index #8) failed. 7 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_RU_TASK ( ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, CASE_EXECUTION_ID_, CASE_INST_ID_, CASE_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, FOLLOW_UP_DATE_, SUSPENSION_STATE_, TENANT_ID_, REV_ ) values ( '83305528-8929-11ec-b4f2-0a580a82147f', 'Проверка', NULL, NULL, 50, '2022-02-09 00:53:12.929000+03'::timestamp, NULL, 'SAPERP', NULL, '82ddc84a-8929-11ec-b4f2-0a580a82147f', 'c785297d-835e-11ec-9cdd-0a580a821443', 'businessTripExpenseReport:5:de36fe6d-597e-11ec-a80e-0a580a8308f0', NULL, NULL, NULL, 'Verification', NULL, NULL, 1, NULL, 1 ) was aborted: ERROR: insert or update on table "act_ru_task" violates foreign key constraint "act_fk_task_exe" Detail: Key (execution_id_)=(82ddc84a-8929-11ec-b4f2-0a580a82147f) is not present in table "act_ru_execution". Call getNextException to see other errors in the batch. java.sql.BatchUpdateException: Batch entry 0 insert into ACT_RU_TASK ( ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, CASE_EXECUTION_ID_, CASE_INST_ID_, CASE_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, FOLLOW_UP_DATE_, SUSPENSION_STATE_, TENANT_ID_, REV_ ) values ( '83305528-8929-11ec-b4f2-0a580a82147f', 'Проверка', NULL, NULL, 50, '2022-02-09 00:53:12.929000+03'::timestamp, NULL, 'SAPERP', NULL, '82ddc84a-8929-11ec-b4f2-0a580a82147f', 'c785297d-835e-11ec-9cdd-0a580a821443', 'businessTripExpenseReport:5:de36fe6d-597e-11ec-a80e-0a580a8308f0', NULL, NULL, NULL, 'Verification', NULL, NULL, 1, NULL, 1 ) was aborted: ERROR: insert or update on table "act_ru_task" violates foreign key constraint "act_fk_task_exe" Detail: Key (execution_id_)=(82ddc84a-8929-11ec-b4f2-0a580a82147f) is not present in table "act_ru_execution". Call getNextException to see other errors in the batch. org.postgresql.util.PSQLException: ERROR: insert or update on table "act_ru_task" violates foreign key constraint "act_fk_task_exe" Detail: Key (execution_id_)=(82ddc84a-8929-11ec-b4f2-0a580a82147f) is not present in table "act_ru_execution". org.postgresql.util.PSQLException: ERROR: insert or update on table "act_ru_task" violates foreign key constraint "act_fk_task_exe" Detail: Key (execution_id_)=(82ddc84a-8929-11ec-b4f2-0a580a82147f) is not present in table "act_ru_execution". '. Flush summary: [ INSERT TaskMeterLogEntity[83307c3b-8929-11ec-b4f2-0a580a82147f] INSERT AuthorizationEntity[83307c39-8929-11ec-b4f2-0a580a82147f] INSERT UserOperationLogEntryEventEntity[832ece86-8929-11ec-b4f2-0a580a82147f] INSERT HistoricVariableUpdateEventEntity[832ece85-8929-11ec-b4f2-0a580a82147f] INSERT HistoricTaskInstanceEventEntity[83305528-8929-11ec-b4f2-0a580a82147f] INSERT HistoricIdentityLinkLogEventEntity[83307c3a-8929-11ec-b4f2-0a580a82147f] INSERT HistoricActivityInstanceEventEntity[Verification:83305527-8929-11ec-b4f2-0a580a82147f] INSERT TaskEntity[83305528-8929-11ec-b4f2-0a580a82147f] UPDATE VariableInstanceEntity[7a70316e-8929-11ec-b4f2-0a580a82147f] DELETE TaskEntity[82ddc84e-8929-11ec-b4f2-0a580a82147f] UPDATE ExecutionEntity[82ddc84a-8929-11ec-b4f2-0a580a82147f] UPDATE HistoricActivityInstanceEventEntity[Sending:82ddc84d-8929-11ec-b4f2-0a580a82147f] UPDATE HistoricTaskInstanceEventEntity[82ddc84e-8929-11ec-b4f2-0a580a82147f] DELETE_BULK deleteAuthorizationsForResourceId {resourceId=82ddc84e-8929-11ec-b4f2-0a580a82147f, resourceType=7} UPDATE HistoricVariableInstanceEntity[7a70316e-8929-11ec-b4f2-0a580a82147f] ] at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.flushDbOperationException(EnginePersistenceLogger.java:131) ... 66 more Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.insertTask (batch index #8) failed. 7 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_RU_TASK ( ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, CASE_EXECUTION_ID_, CASE_INST_ID_, CASE_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, FOLLOW_UP_DATE_, SUSPENSION_STATE_, TENANT_ID_, REV_ ) values ( '83305528-8929-11ec-b4f2-0a580a82147f', 'Проверка', NULL, NULL, 50, '2022-02-09 00:53:12.929000+03'::timestamp, NULL, 'SAPERP', NULL, '82ddc84a-8929-11ec-b4f2-0a580a82147f', 'c785297d-835e-11ec-9cdd-0a580a821443', 'businessTripExpenseReport:5:de36fe6d-597e-11ec-a80e-0a580a8308f0', NULL, NULL, NULL, 'Verification', NULL, NULL, 1, NULL, 1 ) was aborted: ERROR: insert or update on table "act_ru_task" violates foreign key constraint "act_fk_task_exe" Detail: Key (execution_id_)=(82ddc84a-8929-11ec-b4f2-0a580a82147f) is not present in table "act_ru_execution". Call getNextException to see other errors in the batch. ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.insertTask (batch index #8) failed. 7 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_RU_TASK ( ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, CASE_EXECUTION_ID_, CASE_INST_ID_, CASE_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, FOLLOW_UP_DATE_, SUSPENSION_STATE_, TENANT_ID_, REV_ ) values ( '83305528-8929-11ec-b4f2-0a580a82147f', 'Проверка', NULL, NULL, 50, '2022-02-09 00:53:12.929000+03'::timestamp, NULL, 'SAPERP', NULL, '82ddc84a-8929-11ec-b4f2-0a580a82147f', 'c785297d-835e-11ec-9cdd-0a580a821443', 'businessTripExpenseReport:5:de36fe6d-597e-11ec-a80e-0a580a8308f0', NULL, NULL, NULL, 'Verification', NULL, NULL, 1, NULL, 1 ) was aborted: ERROR: insert or update on table "act_ru_task" violates foreign key constraint "act_fk_task_exe" Detail: Key (execution_id_)=(82ddc84a-8929-11ec-b4f2-0a580a82147f) is not present in table "act_ru_execution". Call getNextException to see other errors in the batch. at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) at org.apache.ibatis.session.defaults.DefaultSqlSession.flushStatements(DefaultSqlSession.java:254) at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.flushBatchOperations(DbSqlSession.java:444) at org.camunda.bpm.engine.impl.db.sql.BatchDbSqlSession.executeDbOperations(BatchDbSqlSession.java:74) at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:341) ... 65 more Caused by: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.insertTask (batch index #8) failed. 7 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_RU_TASK ( ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, CASE_EXECUTION_ID_, CASE_INST_ID_, CASE_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, FOLLOW_UP_DATE_, SUSPENSION_STATE_, TENANT_ID_, REV_ ) values ( '83305528-8929-11ec-b4f2-0a580a82147f', 'Проверка', NULL, NULL, 50, '2022-02-09 00:53:12.929000+03'::timestamp, NULL, 'SAPERP', NULL, '82ddc84a-8929-11ec-b4f2-0a580a82147f', 'c785297d-835e-11ec-9cdd-0a580a821443', 'businessTripExpenseReport:5:de36fe6d-597e-11ec-a80e-0a580a8308f0', NULL, NULL, NULL, 'Verification', NULL, NULL, 1, NULL, 1 ) was aborted: ERROR: insert or update on table "act_ru_task" violates foreign key constraint "act_fk_task_exe" Detail: Key (execution_id_)=(82ddc84a-8929-11ec-b4f2-0a580a82147f) is not present in table "act_ru_execution". Call getNextException to see other errors in the batch. at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:149) at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:129) at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:122) at org.apache.ibatis.executor.CachingExecutor.flushStatements(CachingExecutor.java:114) at org.apache.ibatis.session.defaults.DefaultSqlSession.flushStatements(DefaultSqlSession.java:252) ... 68 more Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into ACT_RU_TASK ( ID_, NAME_, PARENT_TASK_ID_, DESCRIPTION_, PRIORITY_, CREATE_TIME_, OWNER_, ASSIGNEE_, DELEGATION_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, CASE_EXECUTION_ID_, CASE_INST_ID_, CASE_DEF_ID_, TASK_DEF_KEY_, DUE_DATE_, FOLLOW_UP_DATE_, SUSPENSION_STATE_, TENANT_ID_, REV_ ) values ( '83305528-8929-11ec-b4f2-0a580a82147f', 'Проверка', NULL, NULL, 50, '2022-02-09 00:53:12.929000+03'::timestamp, NULL, 'SAPERP', NULL, '82ddc84a-8929-11ec-b4f2-0a580a82147f', 'c785297d-835e-11ec-9cdd-0a580a821443', 'businessTripExpenseReport:5:de36fe6d-597e-11ec-a80e-0a580a8308f0', NULL, NULL, NULL, 'Verification', NULL, NULL, 1, NULL, 1 ) was aborted: ERROR: insert or update on table "act_ru_task" violates foreign key constraint "act_fk_task_exe" Detail: Key (execution_id_)=(82ddc84a-8929-11ec-b4f2-0a580a82147f) is not present in table "act_ru_execution". Call getNextException to see other errors in the batch. at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:148) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2156) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:460) at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:793) at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1659) at jdk.internal.reflect.GeneratedMethodAccessor30.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) at com.sun.proxy.$Proxy4.executeBatch(Unknown Source) at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:123) ... 72 more Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "act_ru_task" violates foreign key constraint "act_fk_task_exe" Detail: Key (execution_id_)=(82ddc84a-8929-11ec-b4f2-0a580a82147f) is not present in table "act_ru_execution". at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155) ... 81 more