我正在使用以下命令运行Spring批处理应用程序:
java -jar application.jar --spring.batch.job.names=nameJob param1=PXD002089 param2=51925
作业成功完成:
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 -
但是,此后,该工具将引发错误,退出代码为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
我在JobLauncherCommandLineRunner.java:174
课上表现不佳,而Spring正在尝试阅读下一份工作?
有什么主意吗?
预先感谢
答案 0 :(得分:1)
我建议从原因开始调查:
“由以下原因引起:java.lang。 NullPointerException :空”。
也许解决方案可能很简单。