org.springframework.batch.io.exception.FlatFileParsingException: Parsing error

Spring JIRA | Fabian Krämer | 9 years ago
  1. 0

    The SimpleFlatFileInputSource throws at line 198 a FlatFileParsingException with just the message "Parsing error": org.springframework.batch.io.exception.FlatFileParsingException: Parsing error at org.springframework.batch.io.file.support.SimpleFlatFileInputSource.read(SimpleFlatFileInputSource.java:198) at org.springframework.batch.item.provider.InputSourceItemProvider.next(InputSourceItemProvider.java:48) at org.springframework.batch.execution.tasklet.ItemProviderProcessTasklet.execute(ItemProviderProcessTasklet.java:141) at org.springframework.batch.execution.step.simple.SimpleStepExecutor.doTaskletProcessing(SimpleStepExecutor.java:372) at org.springframework.batch.execution.step.simple.DefaultStepExecutor.doTaskletProcessing(DefaultStepExecutor.java:61) at org.springframework.batch.execution.step.simple.SimpleStepExecutor$2.doInIteration(SimpleStepExecutor.java:347) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:324) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:201) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:131) at org.springframework.batch.execution.step.simple.SimpleStepExecutor.processChunk(SimpleStepExecutor.java:334) at org.springframework.batch.execution.step.simple.SimpleStepExecutor$1$2.doInTransaction(SimpleStepExecutor.java:220) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at org.springframework.batch.execution.step.simple.SimpleStepExecutor$1.doInIteration(SimpleStepExecutor.java:208) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:324) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:201) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:131) at org.springframework.batch.execution.step.simple.SimpleStepExecutor.process(SimpleStepExecutor.java:185) at org.springframework.batch.execution.job.DefaultJobExecutor.run(DefaultJobExecutor.java:97) at org.springframework.batch.execution.launch.SimpleJobExecutorFacade.start(SimpleJobExecutorFacade.java:199) at org.springframework.batch.execution.launch.SimpleJobLauncher.runInternal(SimpleJobLauncher.java:248) at org.springframework.batch.execution.launch.SimpleJobLauncher$1.run(SimpleJobLauncher.java:292) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) at org.springframework.batch.execution.launch.SimpleJobLauncher.run(SimpleJobLauncher.java:280) at com.loyaltypartner.gp.batch.AbstractBatchJobTest.execute(AbstractBatchJobTest.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:198) at org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:274) at org.springframework.test.context.junit4.SpringMethodRoadie$2.run(SpringMethodRoadie.java:207) at org.springframework.test.context.junit4.SpringMethodRoadie.runBeforesThenTestThenAfters(SpringMethodRoadie.java:254) at org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:234) at org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:204) at org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:146) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:151) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: java.lang.NumberFormatException: For input string: "911964382559" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:459) at java.lang.Integer.parseInt(Integer.java:497) at org.springframework.batch.io.file.FieldSet.readInt(FieldSet.java:250) at *.*.*.batch.converter.UserDataConverter.mapLine(UserDataConverter.java:60) at org.springframework.batch.io.file.support.SimpleFlatFileInputSource.read(SimpleFlatFileInputSource.java:195) ... 46 more It is good that the cause is still added, but it would be better to replace it with something like "Parsing error at line "+line+", message: "+getMessage() without cause or "Parsing error at line "+line+", see cause"

    Spring JIRA | 9 years ago | Fabian Krämer
    org.springframework.batch.io.exception.FlatFileParsingException: Parsing error
  2. 0

    The SimpleFlatFileInputSource throws at line 198 a FlatFileParsingException with just the message "Parsing error": org.springframework.batch.io.exception.FlatFileParsingException: Parsing error at org.springframework.batch.io.file.support.SimpleFlatFileInputSource.read(SimpleFlatFileInputSource.java:198) at org.springframework.batch.item.provider.InputSourceItemProvider.next(InputSourceItemProvider.java:48) at org.springframework.batch.execution.tasklet.ItemProviderProcessTasklet.execute(ItemProviderProcessTasklet.java:141) at org.springframework.batch.execution.step.simple.SimpleStepExecutor.doTaskletProcessing(SimpleStepExecutor.java:372) at org.springframework.batch.execution.step.simple.DefaultStepExecutor.doTaskletProcessing(DefaultStepExecutor.java:61) at org.springframework.batch.execution.step.simple.SimpleStepExecutor$2.doInIteration(SimpleStepExecutor.java:347) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:324) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:201) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:131) at org.springframework.batch.execution.step.simple.SimpleStepExecutor.processChunk(SimpleStepExecutor.java:334) at org.springframework.batch.execution.step.simple.SimpleStepExecutor$1$2.doInTransaction(SimpleStepExecutor.java:220) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at org.springframework.batch.execution.step.simple.SimpleStepExecutor$1.doInIteration(SimpleStepExecutor.java:208) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:324) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:201) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:131) at org.springframework.batch.execution.step.simple.SimpleStepExecutor.process(SimpleStepExecutor.java:185) at org.springframework.batch.execution.job.DefaultJobExecutor.run(DefaultJobExecutor.java:97) at org.springframework.batch.execution.launch.SimpleJobExecutorFacade.start(SimpleJobExecutorFacade.java:199) at org.springframework.batch.execution.launch.SimpleJobLauncher.runInternal(SimpleJobLauncher.java:248) at org.springframework.batch.execution.launch.SimpleJobLauncher$1.run(SimpleJobLauncher.java:292) at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) at org.springframework.batch.execution.launch.SimpleJobLauncher.run(SimpleJobLauncher.java:280) at com.loyaltypartner.gp.batch.AbstractBatchJobTest.execute(AbstractBatchJobTest.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:198) at org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:274) at org.springframework.test.context.junit4.SpringMethodRoadie$2.run(SpringMethodRoadie.java:207) at org.springframework.test.context.junit4.SpringMethodRoadie.runBeforesThenTestThenAfters(SpringMethodRoadie.java:254) at org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:234) at org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:204) at org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:146) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:151) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: java.lang.NumberFormatException: For input string: "911964382559" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:459) at java.lang.Integer.parseInt(Integer.java:497) at org.springframework.batch.io.file.FieldSet.readInt(FieldSet.java:250) at *.*.*.batch.converter.UserDataConverter.mapLine(UserDataConverter.java:60) at org.springframework.batch.io.file.support.SimpleFlatFileInputSource.read(SimpleFlatFileInputSource.java:195) ... 46 more It is good that the cause is still added, but it would be better to replace it with something like "Parsing error at line "+line+", message: "+getMessage() without cause or "Parsing error at line "+line+", see cause"

    Spring JIRA | 9 years ago | Fabian Krämer
    org.springframework.batch.io.exception.FlatFileParsingException: Parsing error
  3. 0

    java.lang.NumberFormatException: For input string | Oracle Community

    oracle.com | 8 months ago
    java.lang.NumberFormatException: For input string: "51958444223"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    "java.lang.NumberFormatException: For input string: "100000000000" " at compilation | JModelica.org

    jmodelica.org | 1 week ago
    java.lang.NumberFormatException: For input string: "100000000000"
  6. 0

    Bug 132090 – java.lang.NumberFormatException: For input string: "4294967295"

    netbeans.org | 1 year ago
    java.lang.NumberFormatException: For input string: "4294967295"

  1. Handemelindo 6 times, last 3 days ago
  2. bmacedo 2 times, last 4 days ago
  3. MoYapro 1 times, last 1 week ago
  4. filpgame 4 times, last 3 weeks ago
  5. silex 6 times, last 1 month ago
32 more registered users
63 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NumberFormatException

    For input string: "911964382559"

    at java.lang.NumberFormatException.forInputString()
  2. Java RT
    Integer.parseInt
    1. java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    2. java.lang.Integer.parseInt(Integer.java:459)
    3. java.lang.Integer.parseInt(Integer.java:497)
    3 frames
  3. org.springframework.batch
    FieldSet.readInt
    1. org.springframework.batch.io.file.FieldSet.readInt(FieldSet.java:250)
    1 frame