Announcement Announcement Module
Collapse
No announcement yet.
Filters are not supported with the rm, get, and mget commands while using SI 2.2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 06:24 AM.

  • #2
    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

    Comment


    • #3
      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.

      Comment

      Working...
      X