java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I encountered the following error : the class RepeatTemplate throws a NullPointerException (cf stacktrace below) The step uses a ThreadPoolTaskExecutor, and i implemented a synchronized delegate reader. Another person seems to have encountered the same problem in the past : http://forum.springsource.org/archive/index.php/t-61715.html Here is an extract from the log with the stack trace. {noformat} 2011-07-06 14:43:05,844 INFO [org.springframework.batch.core.job.SimpleStepHandler] - Executing step: [buildStep] 2011-07-06 14:43:10,672 WARN [org.springframework.batch.core.step.item.ChunkMonitor] - No ItemReader set (must be concurrent step), so ignoring offset data. 2011-07-06 14:43:11,396 WARN [org.springframework.batch.core.step.item.ChunkMonitor] - ItemStream was opened in a different thread. Restart data could be compromised. 2011-07-06 14:52:21,721 ERROR [org.springframework.batch.core.step.AbstractStep] - Encountered an error executing the step java.lang.NullPointerException at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:231) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:250) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195) at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:135) 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.resume(SimpleFlow.java:144) 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) at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:281) 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) {noformat}
    via by Yann Moisan,
  • I encountered the following error : the class RepeatTemplate throws a NullPointerException (cf stacktrace below) The step uses a ThreadPoolTaskExecutor, and i implemented a synchronized delegate reader. Another person seems to have encountered the same problem in the past : http://forum.springsource.org/archive/index.php/t-61715.html Here is an extract from the log with the stack trace. {noformat} 2011-07-06 14:43:05,844 INFO [org.springframework.batch.core.job.SimpleStepHandler] - Executing step: [buildStep] 2011-07-06 14:43:10,672 WARN [org.springframework.batch.core.step.item.ChunkMonitor] - No ItemReader set (must be concurrent step), so ignoring offset data. 2011-07-06 14:43:11,396 WARN [org.springframework.batch.core.step.item.ChunkMonitor] - ItemStream was opened in a different thread. Restart data could be compromised. 2011-07-06 14:52:21,721 ERROR [org.springframework.batch.core.step.AbstractStep] - Encountered an error executing the step java.lang.NullPointerException at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:231) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:250) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195) at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:135) 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.resume(SimpleFlow.java:144) 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) at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:281) 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) {noformat}
    via by Yann Moisan,
    • java.lang.NullPointerException at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:231) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:250) at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195) at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:135) 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.resume(SimpleFlow.java:144) 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) at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:281) 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)
    No Bugmate found.