Hi,
I am trying to upload my files to the FTP using spring integration ftp.
The upload code works fine.
But when i try to get the list of files from the FTP using ftp outbound gateway i get the following issue.
I am using the spring-integration-ftp-2.0.5.RELEASE.jarCode:org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot locate BeanDefinitionParser for element [outbound-gateway] Offending resource: file [/home/annuk/workspace/FTPTEST/WebContent/WEB-INF/config/spring/ftp/ftp-config.xml] at org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:59) at org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68) at org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement(NamespaceHandlerSupport.java:84) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73) at org.springframework.integration.config.xml.AbstractIntegrationNamespaceHandler.parse(AbstractIntegrationNamespaceHandler.java:53) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1335) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
my config is as follows:
I copied the code from https://github.com/SpringSource/spri...ster/basic/ftpCode:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int="http://www.springframework.org/schema/integration" xmlns:int-ftp="http://www.springframework.org/schema/integration/ftp" xsi:schemaLocation="http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp-2.1.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.1.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <int:channel id="ftpChannel"/> <int:channel id="ftplsChannel"/> <bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory"> <property name="host" value="myftp"/> <property name="port" value="21"/> <property name="username" value="myusername"/> <property name="password" value="mypassword"/> </bean> <int-ftp:outbound-channel-adapter id="ftpOutbound" cache-sessions="false" channel="ftpChannel" remote-directory="/test-ftp" session-factory="ftpClientFactory"/> <int-ftp:outbound-gateway command="ls" session-factory="ftpClientFactory" expression="payload" request-channel="ftplsChannel" /> <int:gateway id="ftpGateway" default-request-channel="ftplsChannel" service-interface="com.ftptest.test.ToFtpGateway"/> </beans>
I need to verify whether my files have been copied successfully to the FTP or not.So was getting the list of files on the FTP.
Please help.
Thanks in Advance.
Regards,
Annuk.![]()


Reply With Quote
