Results 1 to 3 of 3

Thread: Filters are not supported with the rm, get, and mget commands while using SI 2.2

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

    Question Filters are not supported with the rm, get, and mget commands while using SI 2.2

    Hi,

    I am using Spring ftp to get files from FTP. I use the ls and get commands with FTP outbound gateway. The code was working fine with SI 2.1.

    But when I switched to 2.2 it started giving me the following error:
    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.ftp.gateway.FtpOutboundGateway#1': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Filters are not supported with the rm, get, and mget commands
    My namespace config:
    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 http://www.springframework.org/schema/integration/spring-integration-2.2.xsd
    	http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp-2.2.xsd
    		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
    
    	<int-ftp:outbound-gateway command="ls"
    		expression="payload" session-factory="ftpClientFactory"
    		request-channel="ftpLsChannel"  />
    
    	<int-ftp:outbound-gateway command="get" id="getOutbound"
    		expression="payload" session-factory="ftpClientFactory"
    		local-directory="/home/annuk/Desktop/my-requests/csv"
    		filename-pattern="*.csv" request-channel="ftpGetChannel" />
    Where am i going wrong?

    Regards,
    Annuk
    Last edited by annuk; Dec 26th, 2012 at 06:24 AM.

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

    Thumbs up

    Hi,

    Just removed the file-name pattern attribute from ftp-outbound gateway and it is working now.

    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 http://www.springframework.org/schema/integration/spring-integration-2.2.xsd
    	http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp-2.2.xsd
    		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
    
    	<int-ftp:outbound-gateway command="ls"
    		expression="payload" session-factory="ftpClientFactory"
    		request-channel="ftpLsChannel"  />
    
    	<int-ftp:outbound-gateway command="get" id="getOutbound"
    		expression="payload" session-factory="ftpClientFactory"
    		local-directory="/home/annuk/Desktop/my-requests/csv"
    	 request-channel="ftpGetChannel" />
    Regards,
    Annuk

  3. #3
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,020

    Default

    Yes, previously, these filters were simply ignored except when using 'ls'.

    I have added a note to the migration guide https://github.com/SpringSource/spri...igration-Guide.

    Thanks.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

Posting Permissions

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