Spring Batch Job没有明显原因停止

时间:2019-06-28 09:55:24

标签: java spring spring-batch

我有一个春季批简单工作:

@Autowired
public JobBuilderFactory jobs;

@Bean
public Job jobTraitement(JobCompletionNotificationListener listener,
                         @Qualifier("stepOne") Step stepOne,
                         @Qualifier("stepTwo") Step stepTwo,
                         @Qualifier("stepThree") Step stepThree,
                         @Qualifier("stepFour") Step stepFour,
                         @Qualifier("stepFive") Step stepFive,
                         @Qualifier("stepSix") Step stepSix,
                         @Qualifier("stepSeven") Step stepSeven,
                         @Qualifier("stepEight") Step stepEight,
                         @Qualifier("stepNine") Step stepNine) {
    return jobs.get(ConstantesCommunes.JobNames.MY_NINESTEPS_JOB)
            .incrementer(new RunIdIncrementer())
            .preventRestart()
            .listener(listener)
            .start(stepOne)
            .next(stepTwo)
            .next(stepThree)
            .next(stepFour)
            .next(stepFive)
            .next(stepSix)
            .next(stepSeven)
            .next(stepEight)
            .next(stepNine)
            .build();
}

当我在开发机器上执行此作业时,它会正确执行所有步骤并以状态COMPLETED结尾,但是在生产机(具有相同的输入和参数)中,该作业以状态{{ 1}},没有明显的原因,也没有任何类型的错误:

stepSix

在数据库的STOPPED表中,状态为2019-06-27 18:49:48.666 INFO 36529 --- [ main] o.s.b.c.r.support.SimpleJobRepository : Parent JobExecution is stopped, so passing message on to StepExecution 2019-06-27 18:49:48.670 INFO 36529 --- [ main] o.s.batch.core.job.AbstractJob : Encountered interruption executing job: JobExecution interrupted. 27/Jun/2019 18:49:48.670 - {} - [main] INFO com.package.helpers.JobCompletionNotificationListener - [my_ninesteps_job] STOPPED ,退出消息为batch_job_execution

我读了spring stopped logging that exception,所以我的问题是:是否可以激活该异常的日志?还有其他人遇到过同样的问题吗?

谢谢

更新

我正在使用log4j进行日志记录,并且日志记录级别设置为debug:

STOPPED

0 个答案:

没有答案