春季批处理流程执行意外结束

时间:2019-04-05 07:07:03

标签: spring-batch spring-batch-tasklet

我有spring批处理作业-从数据库读取数据并将其写入文件。当流程处于决策程序中时-低于stackTrace

会意外失败

我只得到下面的堆栈跟踪信息-

org.springframework.batch.core.JobExecutionException: Flow execution ended unexpectedly
               at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:141)
               at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:293)
               at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:120)
               at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
               at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:114)
               at org.springframework.batch.core.launch.support.CommandLineJobRunner.start(CommandLineJobRunner.java:349)
               at org.springframework.batch.core.launch.support.CommandLineJobRunner.main(CommandLineJobRunner.java:574)
Caused by: org.springframework.batch.core.job.flow.FlowExecutionException: Ended flow=myJOb at state=myJOb.myStep with exception
               at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:152)
               at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124)
               at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135)
               ... 6 more
Caused by: java.util.EmptyStackException
               at org.codehaus.jettison.util.FastStack.peek(FastStack.java:39)
               at org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeStartElement(MappedXMLStreamWriter.java:275)
               at org.springframework.batch.core.repository.dao.XStreamExecutionContextStringSerializer.serialize(XStreamExecutionContextStringSerializer.java:43)
               at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.serializeContext(JdbcExecutionContextDao.java:212)
               at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.updateExecutionContext(JdbcExecutionContextDao.java:122)
               at org.springframework.batch.core.repository.support.SimpleJobRepository.updateExecutionContext(SimpleJobRepository.java:188)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:606)
               at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
               at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
               at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
               at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
               at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
               at com.sun.proxy.$Proxy93.updateExecutionContext(Unknown Source)
               at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:145)
               at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:61)
               at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60)
               at org.springframework.batch.core.job.flow.support.SimpleFlow

春季批处理流程如下

Validate input param --> Read file --> map --> Decider --> with respective key call next step  --> 

可能出了什么问题..?

感谢您的帮助。

0 个答案:

没有答案