org.springframework.batch.item.ItemStreamException: Failed to initialize the reader

Stack Overflow | user5758361 | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Parsing a fixed format flat file using Spring or Java 8

    Stack Overflow | 8 months ago | user5758361
    org.springframework.batch.item.ItemStreamException: Failed to initialize the reader

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      No stream mapping configured for name 'fileDummy'

      at org.beanio.internal.DefaultStreamFactory.getStream()
    2. BeanIO
      BeanIOFlatFileItemReader.doOpen
      1. org.beanio.internal.DefaultStreamFactory.getStream(DefaultStreamFactory.java:129)
      2. org.beanio.internal.DefaultStreamFactory.createReader(DefaultStreamFactory.java:70)
      3. org.beanio.spring.BeanIOFlatFileItemReader.doOpen(BeanIOFlatFileItemReader.java:129)
      3 frames
    3. Spring Batch Infrastructure
      AbstractItemCountingItemStreamItemReader.open
      1. org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.open(AbstractItemCountingItemStreamItemReader.java:144)
      1 frame
    4. com.gateway.fileloader
      ArchiveFileProcessor.doProcess
      1. com.gateway.fileloader.fileprocessor.ArchiveFileProcessor.createBeanIOFlatFileItemReader(ArchiveFileProcessor.java:211)
      2. com.gateway.fileloader.fileprocessor.ArchiveFileProcessor.doProcess(ArchiveFileProcessor.java:84)
      2 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:497)
      4 frames
    6. Spring Expression Language (SpEL)
      SpelExpression.getValue
      1. org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:113)
      2. org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:129)
      3. org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49)
      4. org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:347)
      5. org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:88)
      6. org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:131)
      7. org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:330)
      7 frames
    7. Spring Integration Core
      AbstractMessageChannel.send
      1. org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:166)
      2. org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:317)
      3. org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:155)
      4. org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:93)
      5. org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:89)
      6. org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:99)
      7. org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)
      8. org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
      9. org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:147)
      10. org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:120)
      11. org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77)
      12. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:442)
      13. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:392)
      13 frames
    8. Spring Messaging
      AbstractMessageSendingTemplate.send
      1. org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115)
      2. org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45)
      3. org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:105)
      3 frames
    9. Spring Integration Core
      ErrorHandlingTaskExecutor$1.run
      1. org.springframework.integration.endpoint.SourcePollingChannelAdapter.handleMessage(SourcePollingChannelAdapter.java:161)
      2. org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:251)
      3. org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:57)
      4. org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:176)
      5. org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:173)
      6. org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:330)
      7. org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:55)
      7 frames
    10. Spring Core
      SyncTaskExecutor.execute
      1. org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
      1 frame
    11. Spring Integration Core
      AbstractPollingEndpoint$Poller.run
      1. org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:51)
      2. org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:324)
      2 frames
    12. Spring Context
      ReschedulingRunnable.run
      1. org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
      2. org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
      2 frames
    13. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      5. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      6. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      7. java.lang.Thread.run(Thread.java:745)
      7 frames