title: org.springframework.batch.item.ItemStreamException: Failed to initialize the reader
body: <p>I'm trying to parse the flat file having multiplerecords.
  for parsing I'm using FlatFileItemReader class.
  while parsing i got this error.</p>
  
  <pre><code>Jan 14, 2016 4:37:45 PM org.springframework.batch.core.step.AbstractStep execute
  SEVERE: Encountered an error executing the step
  org.springframework.batch.item.ItemStreamException: Failed to initialize the reader
      at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.open(AbstractItemCountingItemStreamItemReader.java:142)
      at org.springframework.batch.item.support.CompositeItemStream.open(CompositeItemStream.java:96)
      at org.springframework.batch.core.step.tasklet.TaskletStep.open(TaskletStep.java:307)
      at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:192)
      at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:137)
      at org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:380)
      at org.springframework.batch.core.job.SimpleJob.doExecute(SimpleJob.java:124)
      at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:301)
      at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)
      at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
      at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:117)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      at com.sun.proxy.$Proxy16.run(Unknown Source)
      at com.deere.FtpMain.main(FtpMain.java:24)
  Caused by: java.lang.IllegalStateException: Input resource must exist (reader is in 'strict' mode): URL [http://finance.yahoo.com/d/quotes.csv?s=XOM+IBM+JNJ+MSFT&amp;amp;f=snd1ol1p2]
      at org.springframework.batch.item.file.FlatFileItemReader.doOpen(FlatFileItemReader.java:251)
      at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.open(AbstractItemCountingItemStreamItemReader.java:139)
      ... 22 more
  </code></pre>
  
  <p>In my reader class is </p>
  
  <pre><code>@Bean
  public ItemReader&lt;FtpData&gt; reader() throws MalformedURLException{
      FlatFileItemReader&lt;FtpData&gt; reader=new FlatFileItemReader&lt;FtpData&gt;();
      reader.setResource(new UrlResource("http://finance.yahoo.com/d/quotes.csv?s=XOM+IBM+JNJ+MSFT&amp;amp;f=snd1ol1p2"));
      reader.setLineMapper(new DefaultLineMapper&lt;FtpData&gt;(){{
          setLineTokenizer(new DelimitedLineTokenizer());
          setFieldSetMapper(new ftpDataSetMapper());
      }});
      return reader;
  }
  </code></pre>
  
  <p>please suggest me any one</p>