Actions
Defect #1568
closedDeleted dependent task - Fail in the task result
Start date:
03/19/2019
Due date:
% Done:
100%
Estimated time:
Affected versions:
Owner:
Description
Affected versions: 9.3.4, 7.8.2
Steps to reproduce:- Create 2 scheduled tasks
- Create a new scheduled start for the task 2 - dependent on the task 1
- Run the task 1 -> everything OK
- Delete the task 2
- Run the task 1 -> the tasks ends with LONG_RUNNING_TASK_FAILED
The problem is that with removing the task 2, the dependent task trigger is not removed.
The error in the log (version 9.3.4):
2019-03-19 13:27:00.245 INFO 18232 --- [task-executor-1] e.b.i.c.a.e.AbstractEntityEventProcessor : Processor [long-running-task-execute-dependent-processor]([core]) start for [LongRunningTaskEvent [type: END, content: eu.bcvsolutions.idm .core.scheduler.api.dto.IdmLongRunningTaskDto [id= 015c8814-9727-4f2b-b03b-b951fea0f34f], properties: {}]] with order [100]. 2019-03-19 13:27:00.250 INFO 18232 --- [task-executor-1] LongRunningTaskExecuteDependentProcessor : Scheduled task [4f8f136e7682-ef9beed7-1136-4b04-a4b0-8a500a470cf1] ended. Dependent task [4f8f136e7682-a171486c-312b-49c4-a7c0-409f24906d9 8] will be executed in dryRun [false]. 2019-03-19 13:27:00.251 ERROR 18232 --- [task-executor-1] e.b.i.c.a.e.AbstractEntityEventProcessor : [core:EVENT_EXECUTE_PROCESSOR_FAILED:d4354edf-39c6-4bb3-92b5-d5307e0c8b27] Event [null] failed in processor [long-running-task-execute-dep endent-processor]. ({eventId=null, processor=long-running-task-execute-dependent-processor}) java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null at org.springframework.util.Assert.notNull(Assert.java:115) at org.springframework.util.Assert.notNull(Assert.java:126) at eu.bcvsolutions.idm.core.scheduler.service.impl.DefaultSchedulerManager.createTrigger(DefaultSchedulerManager.java:344) at eu.bcvsolutions.idm.core.scheduler.service.impl.DefaultSchedulerManager.runTask(DefaultSchedulerManager.java:320) at eu.bcvsolutions.idm.core.scheduler.event.processor.LongRunningTaskExecuteDependentProcessor.lambda$process$246(LongRunningTaskExecuteDependentProcessor.java:85) at java.util.ArrayList.forEach(ArrayList.java:1257) at eu.bcvsolutions.idm.core.scheduler.event.processor.LongRunningTaskExecuteDependentProcessor.process(LongRunningTaskExecuteDependentProcessor.java:80) at eu.bcvsolutions.idm.core.api.event.AbstractEntityEventProcessor.onApplicationEvent(AbstractEntityEventProcessor.java:237) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:348) at eu.bcvsolutions.idm.core.model.service.impl.DefaultEntityEventManager.publishEvent(DefaultEntityEventManager.java:276) at eu.bcvsolutions.idm.core.model.service.impl.DefaultEntityEventManager$$FastClassBySpringCGLIB$$1694e58f.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:651) at eu.bcvsolutions.idm.chmi.model.service.impl.DefaultChmiEntityEventManager$$EnhancerBySpringCGLIB$$e7914aca.publishEvent(<generated>) at eu.bcvsolutions.idm.core.scheduler.api.service.AbstractLongRunningTaskExecutor.end(AbstractLongRunningTaskExecutor.java:236) at eu.bcvsolutions.idm.core.scheduler.api.service.AbstractLongRunningTaskExecutor.call(AbstractLongRunningTaskExecutor.java:191) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.springframework.security.concurrent.DelegatingSecurityContextRunnable.run(DelegatingSecurityContextRunnable.java:80) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2019-03-19 13:27:00.254 ERROR 18232 --- [task-executor-1] .c.s.a.s.AbstractLongRunningTaskExecutor : [core:LONG_RUNNING_TASK_FAILED:55a49341-f6e1-4ce5-acd2-6fe6ed433153] Task [015c8814-9727-4f2b-b03b-b951fea0f34f] type [eu.bcvsolutions.idm.core.audit.task.impl.RemoveOldLogsTaskExecutor] ended on instance [idm-primary] with exception. ({taskId=015c8814-9727-4f2b-b03b-b951fea0f34f, taskType=eu.bcvsolutions.idm.core.audit.task.impl.RemoveOldLogsTaskExecutor, instanceId=idm-primary}) java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null at org.springframework.util.Assert.notNull(Assert.java:115)
The error in the version 7.8.2 is more specific:
eu.bcvsolutions.idm.core.scheduler.exception.SchedulerException: null at eu.bcvsolutions.idm.core.scheduler.service.impl.DefaultSchedulerManager.createTriggerInternal(DefaultSchedulerManager.java:390) at eu.bcvsolutions.idm.core.scheduler.service.impl.DefaultSchedulerManager.createTrigger(DefaultSchedulerManager.java:342) at eu.bcvsolutions.idm.core.scheduler.service.impl.DefaultSchedulerManager.runTask(DefaultSchedulerManager.java:312) at eu.bcvsolutions.idm.core.scheduler.service.impl.DefaultSchedulerManager.runTask(DefaultSchedulerManager.java:302) at eu.bcvsolutions.idm.core.scheduler.event.processor.LongRunningTaskExecuteDependentProcessor.lambda$process$56(LongRunningTaskExecuteDependentProcessor.java:84) at java.util.ArrayList.forEach(ArrayList.java:1257) at eu.bcvsolutions.idm.core.scheduler.event.processor.LongRunningTaskExecuteDependentProcessor.process(LongRunningTaskExecuteDependentProcessor.java:80) at eu.bcvsolutions.idm.core.api.event.AbstractEntityEventProcessor.onApplicationEvent(AbstractEntityEventProcessor.java:192) at eu.bcvsolutions.idm.core.api.event.AbstractEntityEventProcessor.onApplicationEvent(AbstractEntityEventProcessor.java:35) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:348) at eu.bcvsolutions.idm.core.model.service.impl.DefaultEntityEventManager.publishEvent(DefaultEntityEventManager.java:120) at eu.bcvsolutions.idm.core.scheduler.api.service.AbstractLongRunningTaskExecutor.end(AbstractLongRunningTaskExecutor.java:215) at eu.bcvsolutions.idm.core.scheduler.api.service.AbstractLongRunningTaskExecutor.call(AbstractLongRunningTaskExecutor.java:173) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.springframework.security.concurrent.DelegatingSecurityContextRunnable.run(DelegatingSecurityContextRunnable.java:80) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.quartz.JobPersistenceException: Couldn't store trigger '4f8f136e7682-4053029e-66ec-4816-9995-d9aa346e28e6.0e10849a8360-1c24c1ae-67ec-4a57-a377-e9132baf6c61' for 'default.4f8f136e7682-4053029e-66ec-4816-9995-d9aa346e28e6' job:The job (default.4f8f136e7682-4053029e-66ec-4816-9995-d9aa346e28e6) referenced by the trigger does not exist. [See nested exception: org.quartz.JobPersistenceException: The job (default.4f8f136e7682-4053029e-66ec-4816-9995-d9aa346e28e6) referenced by the trigger does not exist.] at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1223) at org.quartz.impl.jdbcjobstore.JobStoreSupport$4.executeVoid(JobStoreSupport.java:1159) at org.quartz.impl.jdbcjobstore.JobStoreSupport$VoidTransactionCallback.execute(JobStoreSupport.java:3719) at org.quartz.impl.jdbcjobstore.JobStoreSupport$VoidTransactionCallback.execute(JobStoreSupport.java:3717) at org.quartz.impl.jdbcjobstore.JobStoreCMT.executeInLock(JobStoreCMT.java:245) at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1155) at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:932) at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:258) at eu.bcvsolutions.idm.core.scheduler.service.impl.DefaultSchedulerManager.createTriggerInternal(DefaultSchedulerManager.java:380) ... 20 more Caused by: org.quartz.JobPersistenceException: The job (default.4f8f136e7682-4053029e-66ec-4816-9995-d9aa346e28e6) referenced by the trigger does not exist. at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1208) ... 28 more
Actions