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

Network: Applet that used to run fine on JRE 1.3 becomes very slow on JRE 1.5 and 1.6

XMLWordPrintable

    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      The problem is observed on all versions of 1.5 and 1.6.

      ADDITIONAL OS VERSION INFORMATION :
      Windows Vista, Windows XP (OS of the browser that launches the applet)

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      On the client side: (1) there is proxy server that the client browser machine goes through for HTTP traffic; (2) the internal DNS inside the client side local LAN cannot resolve the name server.acme.com (assuming the server that serves the page and applet is called server.acme.com).

      A DESCRIPTION OF THE PROBLEM :
      The applet used to run fine on JRE 1.3 for many years. Last year, we upgraded the JRE to 1.5 and discovered that the applet took a very long time to load. Neither the client side proxy and DNS settings nor the applet code has changed.

      The applet console shows that the pause occurs when the JVM is trying to get the applet bytes. Ethereal traces show that the JVM tried to resolve the name server.acme.com a couple of times (but of cause these would fail and time out as the internal DNS server cannot resolve these names).

      Even after the applet code has been loaded and starts running, subsequent accesses to the host (server.acme.com) inside the applet code are also much slower than before.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      It is found that the problem can be reproduced with the demo applets hosted at http://java.sun.com/applets/jdk/1.4/index.html.

      1. On the client side: set up a proxy server and points the browser to use this proxy server for accessing the Internet; make sure that the client side machine is configured to use DNS for resolving IP addresses, and that the DNS server that it uses cannot resolve the host java.sun.com.

      2. Open the applet console so that the progress of the applet can be observed.

      3. Access one of the applets hosted at http://java.sun.com/applets/jdk/1.4/index.html

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The applets should launch and run immediately.
      ACTUAL -
      For Java SE 1.5 and 1.6, the applets can load and run, but there is a long delay before the class(es) can be loaded. The point where it pauses can be observed on the applet console.

      Note: For Java SE 1.4, it cannot find the applet class file(s) and a java.lang.ClassNotFoundException is thrown.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      If the local DNS server can resolve java.sun.com, or if the host name (java.sun.com in this case) is entered in the Windows hosts file, there is no delay during class downloading.

      Also, the setting of networkaddress.cache.negative.ttl to -1 (on the client side) helps a bit.

      Release Regression From : 1.3
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            dtitov Daniil Titov (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: