-
Jun 4th, 2008, 11:24 AM
#1
Rollback error while reader encounters an error
I am getting an error while the reader encounters an error while reading and the writer could not roll-back, as it does not have the marker:
org.springframework.batch.core.step.AbstractStep$F atalException: Failed while processing rollback
at org.springframework.batch.core.step.item.ItemOrien tedStep.processRollback(ItemOrientedStep.java:361)
at org.springframework.batch.core.step.item.ItemOrien tedStep.access$800(ItemOrientedStep.java:66)
at org.springframework.batch.core.step.item.ItemOrien tedStep$1.doInIteration(ItemOrientedStep.java:285)
at org.springframework.batch.repeat.support.RepeatTem plate.getNextResult(RepeatTemplate.java:346)
at org.springframework.batch.repeat.support.RepeatTem plate.executeInternal(RepeatTemplate.java:212)
at org.springframework.batch.repeat.support.RepeatTem plate.iterate(RepeatTemplate.java:143)
at org.springframework.batch.core.step.item.ItemOrien tedStep.doExecute(ItemOrientedStep.java:219)
at org.springframework.batch.core.step.AbstractStep.e xecute(AbstractStep.java:168)
at org.springframework.batch.core.job.SimpleJob.execu te(SimpleJob.java:125)
at org.springframework.batch.core.launch.support.Simp leJobLauncher$1.run(SimpleJobLauncher.java:86)
at org.springframework.core.task.SyncTaskExecutor.exe cute(SyncTaskExecutor.java:49)
at org.springframework.batch.core.launch.support.Simp leJobLauncher.run(SimpleJobLauncher.java:81)
at com.****.AbstractBatchLauncherTests.testLaunchJob( AbstractBatchLauncherTests.java:48)
at com.****.AbstractValidatingBatchLauncherTests.test LaunchJob(AbstractValidatingBatchLauncherTests.jav a:7)
at com.**.FunctionalTests.testLaunchJob(FunctionalTes ts.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154 )
at junit.framework.TestCase.runBare(TestCase.java:127 )
at org.springframework.test.ConditionalTestCase.runBa re(ConditionalTestCase.java:76)
at junit.framework.TestResult$1.protect(TestResult.ja va:106)
at junit.framework.TestResult.runProtected(TestResult .java:124)
at junit.framework.TestResult.run(TestResult.java:109 )
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:2 08)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit 3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecutio n.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:196)
Caused by: org.springframework.batch.item.ResetFailedExceptio n: Could not reset reader
at org.springframework.batch.item.file.separator.Reso urceLineReader$State.reset(ResourceLineReader.java :310)
at org.springframework.batch.item.file.separator.Reso urceLineReader.reset(ResourceLineReader.java:205)
at org.springframework.batch.item.file.FlatFileItemRe ader.reset(FlatFileItemReader.java:229)
at org.springframework.batch.item.support.DelegatingI temReader.reset(DelegatingItemReader.java:84)
at org.springframework.batch.core.step.item.SimpleIte mHandler.reset(SimpleItemHandler.java:117)
at org.springframework.batch.core.step.item.ItemOrien tedStep.processRollback(ItemOrientedStep.java:350)
... 33 more
Caused by: java.io.IOException: Mark invalid
at java.io.BufferedReader.reset(Unknown Source)
at org.springframework.batch.item.file.separator.Reso urceLineReader$State.reset(ResourceLineReader.java :307)
... 38 more
**** is the package name.
It also as a result does not update the database record with the job status, so when I try to rerun it, it says the job is already running.
I am using 1.0.1 version
-
Jun 4th, 2008, 02:18 PM
#2
This is a known issue:
http://jira.springframework.org/browse/BATCH-548
Although, it should still store the meta-data.
The fix is to either buffer items so that reset won't be called on the LineReader, or to clean the data so that you're not skipping so much in between commits. (The fix I'll probably put in will be to buffer the items)
-
Jun 4th, 2008, 03:16 PM
#3
Thanks Lucas! will the fix available in 1.1.0? Do we have any estimate on when it will be released(just curious)? (Jira page says 30th May).
thanks guys!
Last edited by hailspring; Jun 4th, 2008 at 04:00 PM.
-
Jun 4th, 2008, 05:15 PM
#4
Technically it hasn't been addressed yet, but we should be tackling it before 1.1 goes out.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules