Announcement Announcement Module
Collapse
No announcement yet.
FlatFileItemReader where resource type is ftp Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    @SpringBatchGuy,

    Are you doing any kind of resource handling open/close? Also do you use a single(ton) reader for all your reads?

    Comment


    • #17
      No.

      I am using in built spring FlatFileItemReader. I am not doing any open close connection explicitly.

      Code:
      <beans:bean id="itemReader" class="org.springframework.batch.item.file.FlatFileItemReader">
      		<beans:property name="resource" value="file:C:/Rama/rama/Project/CreditCardPayment/batch/lockbox/PRDReport.csv"/>
      		<beans:property name="lineMapper">
      			<beans:bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper">
      				<beans:property name="lineTokenizer">
      					<beans:bean class="org.springframework.batch.item.file.transform.DelimitedLineTokenizer">
      						<beans:property name="delimiter" value="," />
      					</beans:bean>
      				</beans:property>
      				<beans:property name="fieldSetMapper">
      					<beans:bean class="com.emc.it.epayment.lockbox.domain.PRDFlatFileFieldSetterMapper" />
      				</beans:property>
      			</beans:bean>
      		</beans:property>
      		<beans:property name="linesToSkip" value="3" />
      	</beans:bean>
      That is my configuration while reading local file.

      If I replace the file with FTP then I am facing above problem:

      Code:
      "ftp://abc:abc@abc:21/apps/eaidbg1/spring_apps/Archive/External/PRDReport.csv"

      Comment


      • #18
        We have the similar job and it works perfectly fine with UrlResource for FlatFileItemReader. We're using Spring batch 2.0.4

        Comment

        Working...
        X