org.springframework.batch.item.file.NonTransientFlatFileException: Unable to read from resource: [file [/home/abc/abv/file.csv.3]]

Spring JIRA | prasad babu | 3 years ago
  1. 0

    Hi, Batch process is throwing the following exception inconsistently while reading the files from file system(csv files) and loading into In-Memory database(HSQLDB). I have apprx 27 files in file system(Each file contains 1000000 records). I request your support to fix this issue asap as we are facing this in our PROD environment. {code:xml} org.springframework.batch.item.file.NonTransientFlatFileException: Unable to read from resource: [file [/home/abc/abv/file.csv.3]] at org.springframework.batch.item.file.FlatFileItemReader.readLine(FlatFileItemReader.java:219) at org.springframework.batch.item.file.FlatFileItemReader.doRead(FlatFileItemReader.java:172) at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.read(AbstractItemCountingItemStreamItemReader.java:85) at org.springframework.batch.item.file.MultiResourceItemReader.readNextItem(MultiResourceItemReader.java:119) at org.springframework.batch.item.file.MultiResourceItemReader.read(MultiResourceItemReader.java:108) at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy2.read(Unknown Source) at org.springframework.batch.core.step.item.SimpleChunkProvider.doRead(SimpleChunkProvider.java:90) at org.springframework.batch.core.step.item.SimpleChunkProvider.read(SimpleChunkProvider.java:150) at org.springframework.batch.core.step.item.SimpleChunkProvider$1.doInIteration(SimpleChunkProvider.java:110) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:214) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) at org.springframework.batch.core.step.item.SimpleChunkProvider.provide(SimpleChunkProvider.java:105) at org.springframework.batch.core.step. 2013-06-02 14:05:46.568 {code}

    Spring JIRA | 3 years ago | prasad babu
    org.springframework.batch.item.file.NonTransientFlatFileException: Unable to read from resource: [file [/home/abc/abv/file.csv.3]]
  2. 0

    Hi, Batch process is throwing the following exception inconsistently while reading the files from file system(csv files) and loading into In-Memory database(HSQLDB). I have apprx 27 files in file system(Each file contains 1000000 records). I request your support to fix this issue asap as we are facing this in our PROD environment. {code:xml} org.springframework.batch.item.file.NonTransientFlatFileException: Unable to read from resource: [file [/home/abc/abv/file.csv.3]] at org.springframework.batch.item.file.FlatFileItemReader.readLine(FlatFileItemReader.java:219) at org.springframework.batch.item.file.FlatFileItemReader.doRead(FlatFileItemReader.java:172) at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.read(AbstractItemCountingItemStreamItemReader.java:85) at org.springframework.batch.item.file.MultiResourceItemReader.readNextItem(MultiResourceItemReader.java:119) at org.springframework.batch.item.file.MultiResourceItemReader.read(MultiResourceItemReader.java:108) at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy2.read(Unknown Source) at org.springframework.batch.core.step.item.SimpleChunkProvider.doRead(SimpleChunkProvider.java:90) at org.springframework.batch.core.step.item.SimpleChunkProvider.read(SimpleChunkProvider.java:150) at org.springframework.batch.core.step.item.SimpleChunkProvider$1.doInIteration(SimpleChunkProvider.java:110) at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367) at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:214) at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) at org.springframework.batch.core.step.item.SimpleChunkProvider.provide(SimpleChunkProvider.java:105) at org.springframework.batch.core.step. 2013-06-02 14:05:46.568 {code}

    Spring JIRA | 3 years ago | prasad babu
    org.springframework.batch.item.file.NonTransientFlatFileException: Unable to read from resource: [file [/home/abc/abv/file.csv.3]]

    Root Cause Analysis

    1. org.springframework.batch.item.file.NonTransientFlatFileException

      Unable to read from resource: [file [/home/abc/abv/file.csv.3]]

      at org.springframework.batch.item.file.FlatFileItemReader.readLine()
    2. Spring Batch Infrastructure
      MultiResourceItemReader.read
      1. org.springframework.batch.item.file.FlatFileItemReader.readLine(FlatFileItemReader.java:219)
      2. org.springframework.batch.item.file.FlatFileItemReader.doRead(FlatFileItemReader.java:172)
      3. org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.read(AbstractItemCountingItemStreamItemReader.java:85)
      4. org.springframework.batch.item.file.MultiResourceItemReader.readNextItem(MultiResourceItemReader.java:119)
      5. org.springframework.batch.item.file.MultiResourceItemReader.read(MultiResourceItemReader.java:108)
      5 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:601)
      3 frames
    4. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      4. org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      5. org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      6. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      7. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      7 frames
    5. Unknown
      $Proxy2.read
      1. $Proxy2.read(Unknown Source)
      1 frame
    6. Spring Batch Core
      SimpleChunkProvider$1.doInIteration
      1. org.springframework.batch.core.step.item.SimpleChunkProvider.doRead(SimpleChunkProvider.java:90)
      2. org.springframework.batch.core.step.item.SimpleChunkProvider.read(SimpleChunkProvider.java:150)
      3. org.springframework.batch.core.step.item.SimpleChunkProvider$1.doInIteration(SimpleChunkProvider.java:110)
      3 frames
    7. Spring Batch Infrastructure
      RepeatTemplate.iterate
      1. org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367)
      2. org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:214)
      3. org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143)
      3 frames
    8. Spring Batch Core
      SimpleChunkProvider.provide
      1. org.springframework.batch.core.step.item.SimpleChunkProvider.provide(SimpleChunkProvider.java:105)
      1 frame