简体   繁体   English

成功完成作业后 Spring 批处理出错

[英]Error in Spring batch after job finish with Success

I'm running a Spring batch application with the following command:我正在使用以下命令运行 Spring 批处理应用程序:

java -jar application.jar  --spring.batch.job.names=nameJob param1=PXD002089 param2=51925

The job complete successfully:作业成功完成:

  00:05:14.335 [main] INFO  o.s.b.c.l.support.SimpleJobLauncher - Job: [SimpleJob: [name=nameJob]] completed with the following parameters: [{param2=88210, param1=PXD009239, -spring.batch.job.names=nameJob}] and the following status: [COMPLETED]
  00:05:14.357 [main] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener - 

However, after that, the tool throws an error and the exit code is 1:但是,在那之后,该工具抛出错误,退出代码为 1:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
00:05:14.364 [main] ERROR o.s.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800)
    at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:781)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:335)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
    at uk.ac.ebi.pride.archive.pipeline.ArchiveSubmissionPipeline.main(ArchiveSubmissionPipeline.java:10)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.NullPointerException: null
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.executeLocalJobs(JobLauncherCommandLineRunner.java:174)
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.launchJobFromProperties(JobLauncherCommandLineRunner.java:134)
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.run(JobLauncherCommandLineRunner.java:128)
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:797)
    ... 13 common frames omitted

I was having a llok to that class JobLauncherCommandLineRunner.java:174 and Spring is trying to read the next job?我对 JobLauncherCommandLineRunner.java:174 类很JobLauncherCommandLineRunner.java:174而 Spring 正在尝试阅读下一份工作?

Any idea?任何的想法?

I suggest starting the investigation by the cause:我建议从原因开始调查:

"Caused by: java.lang. NullPointerException : null". “产生的原因:。java.lang中的NullPointerException异常:空”。

Maybe the solution can be simple.也许解决方案很简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM