Announcement Announcement Module
Collapse
No announcement yet.
Rolling back a chunk and continuing with the next chunk Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rolling back a chunk and continuing with the next chunk

    Batch is rollingback a chunk of updates and continueing with the next chunk. Is there any kind of Listener(like RepeatListener's onError method) that can be registered so that my code can be notified.

    05-May-10 09:08: AM. DEBUG org.springframework.batch.core.step.tasklet.Taskle tStep.doInTransaction :381 - Applying contribution: [StepContribution: read=5, written=5, filtered=0, readSkips=0, writeSkips=0, processSkips=0, exitStatus=EXECUTING]
    05-May-10 09:08: AM. DEBUG org.springframework.batch.core.step.tasklet.Taskle tStep.doInTransaction :393 - Saving step execution before commit: StepExecution: id=78976, name=processIPFile, status=STARTED, exitStatus=EXECUTING, readCount=5, filterCount=0, writeCount=5 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=1, rollbackCount=0, exitDescription=
    05-May-10 09:08: AM. DEBUG org.springframework.batch.repeat.support.RepeatTem plate.doHandle :291 - Handling exception: org.springframework.transaction.UnexpectedRollback Exception, caused by: org.springframework.transaction.UnexpectedRollback Exception: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException
    05-May-10 09:08: AM. DEBUG org.springframework.batch.core.step.item.SimpleRet ryExceptionHandler.handleException :85 - Handled non-fatal exception
    org.springframework.transaction.UnexpectedRollback Exception: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException
    at org.springframework.transaction.jta.JtaTransaction Manager.doCommit(JtaTransactionManager.java:1031)
    at org.springframework.transaction.support.AbstractPl atformTransactionManager.processCommit(AbstractPla tformTransactionManager.java:732)
    at org.springframework.transaction.support.AbstractPl atformTransactionManager.commit(AbstractPlatformTr ansactionManager.java:701)
    at org.springframework.transaction.support.Transactio nTemplate.execute(TransactionTemplate.java:140)
    at org.springframework.batch.core.step.tasklet.Taskle tStep$2.doInChunkContext(TaskletStep.java:261)
    at org.springframework.batch.core.scope.context.StepC ontextRepeatCallback.doInIteration(StepContextRepe atCallback.java:76)
    at org.springframework.batch.repeat.support.RepeatTem plate.getNextResult(RepeatTemplate.java:367)
    at org.springframework.batch.repeat.support.RepeatTem plate.executeInternal(RepeatTemplate.java:214)
    at org.springframework.batch.repeat.support.RepeatTem plate.iterate(RepeatTemplate.java:143)
    at org.springframework.batch.core.step.tasklet.Taskle tStep.doExecute(TaskletStep.java:247)
    at org.springframework.batch.core.step.AbstractStep.e xecute(AbstractStep.java:196)
    at org.springframework.batch.core.job.SimpleStepHandl er.handleStep(SimpleStepHandler.java:115)
    at org.springframework.batch.core.job.flow.JobFlowExe cutor.executeStep(JobFlowExecutor.java:61)
    at org.springframework.batch.core.job.flow.support.st ate.StepState.handle(StepState.java:60)
    at org.springframework.batch.core.job.flow.support.Si mpleFlow.resume(SimpleFlow.java:144)
    at org.springframework.batch.core.job.flow.support.Si mpleFlow.start(SimpleFlow.java:124)
    at org.springframework.batch.core.job.flow.FlowJob.do Execute(FlowJob.java:99)
    at org.springframework.batch.core.job.AbstractJob.exe cute(AbstractJob.java:281)
    at org.springframework.batch.core.launch.support.Simp leJobLauncher$1.run(SimpleJobLauncher.java:120)
    at org.springframework.core.task.SyncTaskExecutor.exe cute(SyncTaskExecutor.java:49)
    at org.springframework.batch.core.launch.support.Simp leJobLauncher.run(SimpleJobLauncher.java:114)
    at com.ussco.springbatch.util.WmsJobLauncher.start(Wm sJobLauncher.java:229)
    at com.ussco.springbatch.util.WmsJobLauncher.main(Wms JobLauncher.java:302)
    Caused by: javax.transaction.RollbackException
    at org.objectweb.jotm.TransactionImpl.commit(Transact ionImpl.java:254)
    at org.objectweb.jotm.Current.commit(Current.java:530 )
    at org.springframework.transaction.jta.JtaTransaction Manager.doCommit(JtaTransactionManager.java:1028)
    ... 22 more
    05-May-10 09:08: AM. DEBUG org.springframework.batch.repeat.support.RepeatTem plate.getNextResult :365 - Repeat operation about to start at count=2
    05-May-10 09:08: AM. DEBUG org.springframework.batch.core.scope.context.StepC ontextRepeatCallback.doInIteration :67 - Preparing chunk execution for StepContext: org.springframework.batch.core.scope.context.StepC ontext@341a341a
    05-May-10 09:08: AM. DEBUG org.springframework.batch.core.scope.context.StepC ontextRepeatCallback.doInIteration :75 - Chunk execution starting: queue size=0
    05-May-10 09:08: AM. DEBUG org.springframework.batch.repeat.support.RepeatTem plate.start :463 - Starting repeat context.
Working...
X