javabean9 (1) [Avatar] Offline
#1
hi, im attempting the example in ch04 StopTest and im getting the following error regarding Job interruption. has anyone got around fixing this? or understands why this error ?
Thank You

reading: 0
reading: 1
reading: 2
10:54:34.857 [executor-1] ERROR o.s.batch.core.step.AbstractStep - Encountered an error executing the step
org.springframework.batch.core.JobInterruptedException: Job interrupted status detected.
at org.springframework.batch.core.step.ThreadStepInterruptionPolicy.checkInterrupted(ThreadStepInterruptionPolicy.java:42) ~[spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:277) ~[spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76) ~[spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367) ~[spring-batch-infrastructure-2.1.8.RELEASE.jar:na]
at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:214) ~[spring-batch-infrastructure-2.1.8.RELEASE.jar:na]
at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) ~[spring-batch-infrastructure-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:250) ~[spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195) ~[spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:135) [spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:61) [spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60) [spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144) [spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124) [spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135) [spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:281) [spring-batch-core-2.1.8.RELEASE.jar:na]
at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:120) [spring-batch-core-2.1.8.RELEASE.jar:na]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [na:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:91smilie [na:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_45]
10:54:34.868 [executor-1] ERROR o.s.batch.core.job.AbstractJob - Encountered interruption executing job
arnaud.cogoluegnes (73) [Avatar] Offline
#2
I've just tested on my laptop and the StopTest passes. It's normal to have stack traces in the console, trust the JUnit green bar.