Results 1 to 3 of 3

Thread: Configuration problem: Cannot locate BeanDefinitionParser for element [outbound-gatew

  1. #1
    Join Date
    May 2011
    Location
    Mumbai, India
    Posts
    93

    Question Configuration problem: Cannot locate BeanDefinitionParser for element [outbound-gatew

    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.
    Code:
    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)
    I am using the spring-integration-ftp-2.0.5.RELEASE.jar
    my config is as follows:

    Code:
    <?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 copied the code from https://github.com/SpringSource/spri...ster/basic/ftp
    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.

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,842

    Default

    The "outbound-gateway" was added in 2.1. Please upgrade and try again.

  3. #3
    Join Date
    May 2011
    Location
    Mumbai, India
    Posts
    93

    Thumbs up

    Hey Mark,

    Thanks for your quick reply...
    Regards,
    Annuk.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •