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

Caching resource more then once when using preload.

    XMLWordPrintable

Details

    • b70
    • generic, x86
    • generic, linux, windows_xp

    Description

      Name: gm110360 Date: 09/14/2004


      FULL PRODUCT VERSION :
      java version "1.5.0-rc"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
      Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode, sharing)

      A DESCRIPTION OF THE PROBLEM :
      In time of multiply applet jar loading (with caching) progress bar (in the applet loading icon) is overflowing.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Put classes A and TestProgress to the applet jar j5_A.jar
      Put class B to the applet jar j5_B.jar
      Put class C to the applet jar j5_C.jar

      Use the following TestProgress.html to start applet:

      <html>
      <head>
      <title>
      Test progress
      </title>
      </head>
      <body>
      <applet WIDTH = 100% HEIGHT = 100%
        codebase = "."
        code = "j5.TestProgress.class"
        name = "testprogress"
        CACHE_ARCHIVE_EX = "j5_A.jar;preload,j5_B.jar;preload,j5_C.jar;preload"
        hspace = "0"
        vspace = "0"
        align = "middle"
        progressbar = "true"
      >
      </applet>
      </body>
      </html>

      Put this TestProgress.html and JARs under control of any WEB Server
      (Note: if simply open TestProgress.html from file system plugin cache not used and progress bar is Ok).

      In my case I'm going to http://pc30/inkomdata/0/TestProgress.html


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Progress bar 100%
      ACTUAL -
      Progress bar 170%

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Java Plug-in 1.5.0
      Using JRE version 1.5.0-rc Java HotSpot(TM) Client VM
      User home directory = C:\Documents and Settings\olegun
      network: Loading user-defined proxy configuration ...
      network: Done.
      network: Loading proxy configuration from Internet Explorer ...
      network: Done.
      network: Loading manual proxy configuration ...
      network: Convert proxy bypass list to regular expression:
      network: 192.168.0.1:80 --> 192.168.0.1:80
      network: <local> --> [^.]+
      network: Done.
      network: Proxy Configuration: Manual Configuration
           Proxy: http=192.168.0.1:80,https=192.168.0.1:80,ftp=192.168.0.1:80,gopher=192.168.0.1:80
           Proxy Overrides: 192.168.0.1:80,<local>

      basic: Cache is enabled
      basic: Location: C:\Documents and Settings\olegun\Application Data\Sun\Java\Deployment\cache\javapi\v1.0
      basic: Maximum size: unlimited
      basic: Compression level: 0

      ----------------------------------------------------
      c: clear console window
      f: finalize objects on finalization queue
      g: garbage collect
      h: display this help message
      l: dump classloader list
      m: print memory usage
      o: trigger logging
      p: reload proxy configuration
      q: hide console
      r: reload policy configuration
      s: dump system and deployment properties
      t: dump thread list
      v: dump thread stack
      x: clear classloader cache
      0-5: set trace level to <n>
      ----------------------------------------------------

      basic: Registered modality listener
      liveconnect: Invoking JS method: document
      liveconnect: Invoking JS method: URL
      basic: Referencing classloader: sun.plugin.ClassLoaderInfo@80f4cb, refcount=1
      basic: Added progress listener: sun.plugin.util.GrayBoxPainter@f84386
      basic: Loading applet ...
      basic: Initializing applet ...
      basic: Starting applet ...
      network: Preloading file j5_A.jar
      basic: httpCompression = true
      network: Connecting http://pc30/inkomdata/0/j5_A.jar with proxy=DIRECT
      basic: Downloading http://pc30/inkomdata/0/j5_A.jar to cache
      basic: encoding = null for http://pc30/inkomdata/0/j5_A.jar
      basic: Cached file name: j5_A.jar-40a4309-36b2cce1.zip
      network: Preloading file j5_B.jar
      basic: httpCompression = true
      network: Connecting http://pc30/inkomdata/0/j5_B.jar with proxy=DIRECT
      basic: Downloading http://pc30/inkomdata/0/j5_B.jar to cache
      basic: encoding = null for http://pc30/inkomdata/0/j5_B.jar
      basic: Cached file name: j5_B.jar-4185a8a-354667bd.zip
      network: Preloading file j5_C.jar
      basic: httpCompression = true
      network: Connecting http://pc30/inkomdata/0/j5_C.jar with proxy=DIRECT
      basic: Downloading http://pc30/inkomdata/0/j5_C.jar to cache
      basic: encoding = null for http://pc30/inkomdata/0/j5_C.jar
      basic: Cached file name: j5_C.jar-426720b-2c5f1a0f.zip
      network: Connecting http://pc30/inkomdata/0/j5_B.jar with proxy=DIRECT
      basic: Loading http://pc30/inkomdata/0/j5_B.jar from cache
      basic: No certificate info, this is unsigned JAR file.
      network: Connecting http://pc30/inkomdata/0/j5_C.jar with proxy=DIRECT
      basic: Loading http://pc30/inkomdata/0/j5_C.jar from cache
      basic: No certificate info, this is unsigned JAR file.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package j5;

      import java.awt.*;
      import java.awt.event.*;
      import java.applet.*;
      import javax.swing.*;

      public class TestProgress extends JApplet
      {
          //Initialize the applet
          public void init()
          {
              try
              {
                  A a = new A();
                  B b = new B(); // Progress bar continue moving after 100%
                  C c = new C(); // Progress bar continue moving after 100%
                  Object wait = new Object();
                  // Wait to see progress bar
                  synchronized (wait) {wait.wait(12000);}
                  jbInit();
              }
              catch(Exception e)
              {
                  e.printStackTrace();
              }
          }

          private void jbInit() throws Exception
          {
              this.getContentPane().add(new JLabel("Do you see overflowing progress bar?"));
          }
      }

      ********

      package j5;
      public class A
      {
      }

      ********

      package j5;
      public class B
      {
      }

      ********

      package j5;
      public class C
      {
      }

      ---------- END SOURCE ----------
      (Incident Review ID: 310510)
      ======================================================================
      ###@###.### 10/21/04 19:11 GMT

      Attachments

        Issue Links

          Activity

            People

              ngthomas Thomas Ng (Inactive)
              gmanwanisunw Girish Manwani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: