Announcement Announcement Module
Collapse
No announcement yet.
Strange File access problem in spring batch Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strange File access problem in spring batch

    Hi friends,

    I am using 2.1.0.release spring batch version and facing problem while reading from a flat file.
    Scenario is, in first step m downloading file from ftp and saving the same in local hard disk. In next step i am reading the same file and updating database.
    Even though first step gets completed successfully but FlatFileItemReader is not able to find the file and throws the exception "Input resource must exist (reader is in 'strict' mode): filename". I am running my application using eclipse 3.4.
    but as soon as file gets generated and if i refresh my eclipse project, FlatFileItemReader is able to locate the file.

    Same file if i try to read using FileInputStream, its able to locate the file. Please guys help me in this issue...

    Any help will be really appreciated..

    Thanks in advance

    Ankit Jain

  • #2
    Make your reader scope="step" and it will not be initialized until the step is started.

    Comment

    Working...
    X