第一次运行后,组合任务失败

时间:2020-10-23 07:00:15

标签: spring-cloud-dataflow

编写的任务在第一次运行后失败。在每次运行期间,我们都将“ --increment-instance-enabled”作为作业参数传递。在组合的任务运行程序实例中,此错误失败。

    java.lang.IllegalStateException: Failed to execute CommandLineRunner
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:784) [spring-boot-2.1.10.RELEASE.jar!/:2.1.10.RELEASE]
    at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:765) [spring-boot-2.1.10.RELEASE.jar!/:2.1.10.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:319) [spring-boot-2.1.10.RELEASE.jar!/:2.1.10.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.10.RELEASE.jar!/:2.1.10.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.10.RELEASE.jar!/:2.1.10.RELEASE]
    at org.springframework.cloud.task.app.composedtaskrunner.ComposedTaskRunner.main(ComposedTaskRunner.java:30) [classes!/:2.1.3.RELEASE]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [composed-task-runner.jar:2.1.3.RELEASE]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [composed-task-runner.jar:2.1.3.RELEASE]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [composed-task-runner.jar:2.1.3.RELEASE]
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [composed-task-runner.jar:2.1.3.RELEASE]
Caused by: java.lang.NullPointerException: null
    at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.getExecutionContext(JdbcExecutionContextDao.java:111) ~[spring-batch-core-4.1.2.RELEASE.jar!/:4.1.2.RELEASE]
    at org.springframework.batch.core.repository.support.SimpleJobRepository.createJobExecution(SimpleJobRepository.java:137) ~[spring-batch-core-4.1.2.RELEASE.jar!/:4.1.2.RELEASE]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:295) ~[spring-tx-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean$1.invoke(AbstractJobRepositoryFactoryBean.java:181) ~[spring-batch-core-4.1.2.RELEASE.jar!/:4.1.2.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at com.sun.proxy.$Proxy67.createJobExecution(Unknown Source) ~[na:na]
    at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:134) ~[spring-batch-core-4.1.2.RELEASE.jar!/:4.1.2.RELEASE]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:127) ~[spring-batch-core-4.1.2.RELEASE.jar!/:4.1.2.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.1.11.RELEASE.jar!/:5.1.11.RELEASE]
    at com.sun.proxy.$Proxy69.run(Unknown Source) ~[na:na]
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.execute(JobLauncherCommandLineRunner.java:211) ~[spring-boot-autoconfigure-2.1.10.RELEASE.jar!/:2.1.10.RELEASE]
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.executeLocalJobs(JobLauncherCommandLineRunner.java:183) ~[spring-boot-autoconfigure-2.1.10.RELEASE.jar!/:2.1.10.RELEASE]
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.launchJobFromProperties(JobLauncherCommandLineRunner.java:168) ~[spring-boot-autoconfigure-2.1.10.RELEASE.jar!/:2.1.10.RELEASE]
    at org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.run(JobLauncherCommandLineRunner.java:163) ~[spring-boot-autoconfigure-2.1.10.RELEASE.jar!/:2.1.10.RELEASE]
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:781) [spring-boot-2.1.10.RELEASE.jar!/:2.1.10.RELEASE]
    ... 13 common frames omitted

有人可以帮忙吗?

0 个答案:

没有答案