Results 1 to 2 of 2

Thread: FTP not using port number

  1. #1

    Default FTP not using port number

    Hello,

    I think I've found a bug. I've been trying to use the ftpClientFactory:

    <bean id="ftpClientFactory" class="org.springframework.integration.ftp.session .DefaultFtpSessionFactory">
    <property name="host" value="localhost"/>
    <property name="port" value="40000"/>
    <property name="username" value="test"/>
    <property name="password" value="test123"/>
    <property name="clientMode" value="2"/>
    <property name="fileType" value="2"/>
    <property name="bufferSize" value="100000"/>
    </bean>

    but it doenst seem to use the port number (it still tries to connect to port 21).

    I've looked at the source code:
    http://git.springsource.org/spring-i...y.java#line148

    I see that it only connects to the hostname, not the port. So, i've made a copy of that code and created my own class where I only changed that line to:

    client.connect(host, port);

    It now connects to the desired port specified in the applicationContext.

    Best Regards,
    Mathias Wiberg

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Mathias

    Yes, this is a bug and it was already reported https://jira.springsource.org/browse/INT-1836

    I should fix it today
    Thanks for pointing this out

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
  •