Announcement Announcement Module
Collapse
No announcement yet.
FTP not using port number Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment

    Working...
    X