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

Problem with lookups of localhost with JNDI-DNS provider

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • core-libs
    • b63
    • generic
    • generic

      When using the JNDI-DNS provider (-Dsun.net.spi.nameservice.provider.1=dns,sun) a lookup of localhost will fail (UnknownHostException) if there is no entry for localhost.domain in the dns server. The failure could happen through InetAddress.getByName("localhost") or InetAddress.getLocalHost().

      This should never happen, the dns server should not be required to have an entry for localhost.domain and we cannot count on it being there. In the case where the dns server does not have the entry we should return the loopback address.

            chegar Chris Hegarty
            chegar Chris Hegarty
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: