Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4103639

JDK1.2 FTP URL's using proxy doesn't work. Get UnknownHostException.

    XMLWordPrintable

Details

    • 1.2beta4
    • sparc
    • solaris_2.6
    • Not verified

    Description

      FTP URL's do not work when you specify a proxy to perform hostname lookup. You get a java.net.UnknownHostException error. It seems like the code that suppose to lookup the hostname using the proxy is broken. This happens on "JDK-1.2beta3-B". It also fails on "JDK1.1.5K". I don't see this problem with HTTP and GOPHER URL's. Here is the test code:

      % java -DproxyHost=webcache.east.sun.com -DproxyPort=8080 GetURL -v -d -f data/GetURL.data -o results/GetURL
      DEBUG: opening URL file: data/GetURL.data
      DEBUG: parsing URL: ftp://ftp.javasoft.com/docs/jdk1.0.2/JDK-1_0_2-apidocs.zip
      DEBUG: opening stream to URL: ftp://ftp.javasoft.com/docs/jdk1.0.2/JDK-1_0_2-apidocs.zip
      DEBUG: java.net.UnknownHostException: ftp.javasoft.com, sleep 500ms and retry
      DEBUG: opening stream to URL: ftp://ftp.javasoft.com/docs/jdk1.0.2/JDK-1_0_2-apidocs.zip
      DEBUG: java.net.UnknownHostException: ftp.javasoft.com, sleep 500ms and retry
      DEBUG: opening stream to URL: ftp://ftp.javasoft.com/docs/jdk1.0.2/JDK-1_0_2-apidocs.zip
      DEBUG: java.net.UnknownHostException: ftp.javasoft.com, sleep 500ms and retry
      DEBUG: opening stream to URL: ftp://ftp.javasoft.com/docs/jdk1.0.2/JDK-1_0_2-apidocs.zip
      ERROR: GetURL.main(): exception occurred:
      java.net.UnknownHostException: ftp.javasoft.com
      java.net.UnknownHostException: ftp.javasoft.com
              at java.net.InetAddress.getAllByName0(InetAddress.java:524)
              at java.net.InetAddress.getAllByName0(InetAddress.java:469)
              at java.net.InetAddress.getByName(InetAddress.java:388)
              at java.net.Socket.<init>(Socket.java:91)
              at sun.net.NetworkClient.doConnect(NetworkClient.java:56)
              at sun.net.NetworkClient.openServer(NetworkClient.java:44)
              at sun.net.ftp.FtpClient.openServer(FtpClient.java:248)
              at sun.net.ftp.FtpClient.<init>(FtpClient.java:362)
              at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:64)
              at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:88)
              at java.net.URL.openStream(URL.java:638)
              at GetURL.main(GetURL.java:79)
      FINALSTATUS:GetURL:EXIT_ERROR:2:Number of ERRORS:1:TEST INCOMPLETE

      You can get the GetURL test from the (java.net) Test Suite located at:

      http://jse.east/javanet/testpage.html

      Attachments

        Issue Links

          Activity

            People

              brenaudsunw Benjamin Renaud (Inactive)
              aefreche Alan Frechette (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: