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

作业抛出运行时异常后,后续不会继续触发 #13

Closed
kris1985 opened this issue Oct 17, 2015 · 1 comment
Closed

作业抛出运行时异常后,后续不会继续触发 #13

kris1985 opened this issue Oct 17, 2015 · 1 comment
Labels

Comments

@kris1985
Copy link

job抛出运行时异常后,后续不会继续触发。相当于任务停止。

在job中添加try catch 可以解决此问题。

@haocao
Copy link
Member

haocao commented Oct 19, 2015

经过测试可以调度,还请详细测试场景或日志。以下是测试日志:
------ OneOffElasticDemoJob process: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] at 2015-10-19 17:14:45 ------
[ERROR] 2015-10-19 17:14:45,179 --DEFAULT.oneOffElasticJob_Scheduler_Worker-1-- [org.quartz.core.JobRunShell] Job DEFAULT.oneOffElasticJob threw an unhandled Exception:
java.lang.RuntimeException: null
at com.dangdang.example.elasticjob.fixture.repository.FooRepository.setInactive(FooRepository.java:66) ~[classes/:na]
at com.dangdang.example.elasticjob.spring.job.OneOffElasticDemoJob.process(OneOffElasticDemoJob.java:44) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractOneOffElasticJob.executeJob(AbstractOneOffElasticJob.java:29) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractElasticJob.executeJobInternal(AbstractElasticJob.java:98) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractElasticJob.execute(AbstractElasticJob.java:78) ~[classes/:na]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.1.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:na]
[ERROR] 2015-10-19 17:14:45,179 --DEFAULT.oneOffElasticJob_Scheduler_Worker-1-- [org.quartz.core.ErrorLogger] Job (DEFAULT.oneOffElasticJob threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception.
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) ~[quartz-2.2.1.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:na]
Caused by: java.lang.RuntimeException: null
at com.dangdang.example.elasticjob.fixture.repository.FooRepository.setInactive(FooRepository.java:66) ~[classes/:na]
at com.dangdang.example.elasticjob.spring.job.OneOffElasticDemoJob.process(OneOffElasticDemoJob.java:44) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractOneOffElasticJob.executeJob(AbstractOneOffElasticJob.java:29) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractElasticJob.executeJobInternal(AbstractElasticJob.java:98) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractElasticJob.execute(AbstractElasticJob.java:78) ~[classes/:na]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.1.jar:na]
... 1 common frames omitted
------ OneOffElasticDemoJob process: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] at 2015-10-19 17:14:50 ------
[ERROR] 2015-10-19 17:14:50,019 --DEFAULT.oneOffElasticJob_Scheduler_Worker-1-- [org.quartz.core.JobRunShell] Job DEFAULT.oneOffElasticJob threw an unhandled Exception:
java.lang.RuntimeException: null
at com.dangdang.example.elasticjob.fixture.repository.FooRepository.setInactive(FooRepository.java:66) ~[classes/:na]
at com.dangdang.example.elasticjob.spring.job.OneOffElasticDemoJob.process(OneOffElasticDemoJob.java:44) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractOneOffElasticJob.executeJob(AbstractOneOffElasticJob.java:29) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractElasticJob.executeJobInternal(AbstractElasticJob.java:98) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractElasticJob.execute(AbstractElasticJob.java:78) ~[classes/:na]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.1.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:na]
[ERROR] 2015-10-19 17:14:50,019 --DEFAULT.oneOffElasticJob_Scheduler_Worker-1-- [org.quartz.core.ErrorLogger] Job (DEFAULT.oneOffElasticJob threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception.
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) ~[quartz-2.2.1.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:na]
Caused by: java.lang.RuntimeException: null
at com.dangdang.example.elasticjob.fixture.repository.FooRepository.setInactive(FooRepository.java:66) ~[classes/:na]
at com.dangdang.example.elasticjob.spring.job.OneOffElasticDemoJob.process(OneOffElasticDemoJob.java:44) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractOneOffElasticJob.executeJob(AbstractOneOffElasticJob.java:29) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractElasticJob.executeJobInternal(AbstractElasticJob.java:98) ~[classes/:na]
at com.dangdang.ddframe.job.api.AbstractElasticJob.execute(AbstractElasticJob.java:78) ~[classes/:na]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.1.jar:na]
... 1 common frames omitted

haocao added a commit that referenced this issue Oct 21, 2015
@terrymanu terrymanu changed the title job抛出运行时异常后,后续不会继续触发 [BUG] job抛出运行时异常后,后续不会继续触发 Oct 29, 2015
@terrymanu terrymanu changed the title [BUG] job抛出运行时异常后,后续不会继续触发 [Bug] 作业抛出运行时异常后,后续不会继续触发 Mar 8, 2016
@terrymanu terrymanu changed the title [Bug] 作业抛出运行时异常后,后续不会继续触发 作业抛出运行时异常后,后续不会继续触发 Jul 12, 2016
@terrymanu terrymanu added the bug label Jul 12, 2016
hanahmily added a commit that referenced this issue Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants