Hi guys,
I started playing around with the ftp package today and found that the error below appears when I run my test program. But the weird thing is that the test completes fully, the file is fetched and placed onto a series of integration components and processed correctly.
Any idea why this error appears in the console output? It's one of those red errors too, and we all know that they are never good.
Here's my config file:Code:14:37:14.927 INFO [main][org.springframework.integration.endpoint.EventDrivenConsumer] started _org.springframework.integration.errorLogger 14:37:14.931 INFO [main][org.springframework.integration.endpoint.SourcePollingChannelAdapter] started ftpPuller Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.springframework.integration.file.FileReadingMessageSource] is defined: expected single bean but found 0: at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:271) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083) at com.dnb.integration.SpringIntegrationUtils.displayDirectories(SpringIntegrationUtils.java:53) at com.dnb.integration.Main.main(Main.java:61) 14:37:16.897 INFO [task-scheduler-1][org.springframework.integration.ftp.session.FtpSession] File has been successfully transfered from: //INTEGRATIONTEXT.txt 14:37:17.062 INFO [task-scheduler-1][org.springframework.integration.file.FileReadingMessageSource] Created message: [[Payload=C:\temp\IntegrationTest\PollingFolder\INTEGRATIONTEXT.TXT.a][Headers={timestamp=1350049037062, id=16995519-5efa-4bbe-80fd-2cf49897e98b}]]
Please ignore the name of the local dir, I had begun by dropping the file into a folder which was being polled and having a file inbound channel adapter, but using the ftp channel I think I can skip this part.Code:<int-ftp:inbound-channel-adapter id="ftpPuller" session-factory="ftpClientFactory" channel="filesIn" charset="UTF-8" auto-create-local-directory="true" delete-remote-files="true" filename-pattern="*.txt" remote-directory="/" remote-file-separator="/" local-filename-generator-expression="#this.toUpperCase() + '.a'" local-directory="C:\temp\IntegrationTest\PollingFolder"> <int:poller fixed-rate="5000"/> </int-ftp:inbound-channel-adapter> <int:channel id="filesIn" />
Cheers,
Tony


Reply With Quote
oller id="poller" default="false"
