Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-404

FTPSSocketFactory does not override createSocket(); causes java.net.SocketException: Unconnected sockets not implemented

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 3.0
    • Component/s: FTP
    • Labels:
      None

      Description

      Adding connect timeout for NET-399 changed the code to use socketFactory.createSocket() instead of createSocket(host, port).

      As FTPSSocketFactory does not implement createSocket(), this means that the context socketFactory is not used, leading to:

      java.net.SocketException: Unconnected sockets not implemented
              at javax.net.SocketFactory.createSocket(SocketFactory.java:104)
              at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:714)
              at org.apache.commons.net.ftp.FTPSClient._openDataConnection_(FTPSClient.java:549)
      

      Fix is to implement the no-arg createSocket() method.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb@apache.org Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: