JDK-6645408 : -Dsun.net.spi.nameservice.provider.1 -Dsun.net.spi.nameservice.nameservers bypassed on vista
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2007-12-26
  • Updated: 2010-09-29
  • Resolved: 2008-04-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10Resolved
Related Reports
Relates :  
Description
On vista, -Dsun.net.spi.nameservice.provider.1 -Dsun.net.spi.nameservice.nameservers bypassed in kerneljre

Test run with:
java version "1.6.0_10-ea"
Java(TM) SE Runtime Environment (build 1.6.0_10-ea-b08)
Java HotSpot(TM) Kernel VM (build 11.0-b06-internal-20070910, mixed mode)

Steps to reproduce:
1. Install the kernel jre "*windows-i586-p-iftw-k.exe"
2. Make sure run the test from kerneljre's "initial form" 
   (either immediately(before Kernel has time to finish background downloading)run test after install, or perform step 3 4)
(optinal)3. Kill the background download ( by killing the "java" process )
(optinal)4. Remove all files under ${ProgramFiles}/Java/jre6/lib/bundles/
5. Run Test (Test.java list below) options ( example run.sh attached ) :
-Dsun.net.spi.nameservice.provider.1=dns,sun \ -Dsun.net.spi.nameservice.nameservers=<nameserver_ip> 

Exception thrown at line :InetAddress addr1 = InetAddress.getByName("webcache.sfbay");

java.net.UnknownHostException: webcache.sfbay
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849)
        at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1200)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1153)
        at java.net.InetAddress.getAllByName(InetAddress.java:1083)
        at java.net.InetAddress.getAllByName(InetAddress.java:1019)
        at java.net.InetAddress.getByName(InetAddress.java:969)
        at Test.main(Test.java:8)

------- Test.java Begin -------
import java.net.*;

public class Test
{
  public static void main(String[] args)
  {
     try {
            InetAddress addr1 = InetAddress.getByName("webcache.sfbay");
            System.out.println("webcache.sfbay=" + addr1);
          } catch(Exception e)   {
               e.printStackTrace();
          }
     try {
            InetAddress addr2 = InetAddress.getByName("webcache.sfbay.sun.com");
            System.out.println("webcache.sfbay.sun.com=" + addr2);
          } catch(Exception e)   {
               e.printStackTrace();
          }
   }
}
------- Test.java End -------

No problem if run with normal jdk/jre on the same machine
No problem on winxp for both normal jdk and kerneljre

Comments
EVALUATION I am no longer able to reproduce this in b23.
24-04-2008