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

Turning on Jar Caching causes a DownloadException and the applet jar fails load

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      x86
    • OS:
      windows_nt

      Description

      Loader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.applet.AppletClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.applet.AppletClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.applet.AppletClassLoader.loadCode(Unknown Source)
      at sun.applet.AppletPanel.createApplet(Unknown Source)
      at sun.plugin.AppletViewer.createApplet(Unknown Source)
      at sun.applet.AppletPanel.runLoader(Unknown Source)
      at sun.applet.AppletPanel.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      load: class mycompany.upload.UploadApplet.class not found.

      java.lang.ClassNotFoundException: mycompany.UploadApplet.class
      at sun.applet.AppletClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.applet.AppletClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.applet.AppletClassLoader.loadCode(Unknown Source)
      at sun.applet.AppletPanel.createApplet(Unknown Source)
      at sun.plugin.AppletViewer.createApplet(Unknown Source)
      at sun.applet.AppletPanel.runLoader(Unknown Source)
      at sun.applet.AppletPanel.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      caused by: java.io.IOException: open HTTP connection failed.
      at sun.applet.AppletClassLoader.getBytes(Unknown Source)
      at sun.applet.AppletClassLoader.access$100(Unknown Source)
      at sun.applet.AppletClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      ... 10 more

      Exception: java.lang.ClassNotFoundException: mycompany.UploadApplet.class



      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      No caching is available. The application does run, but the jar my be downloaded each time. Load testing the application is next to impossible.
      (Review ID: 183793)
      ======================================================================
      Name: gm110360 Date: 04/09/2003


      FULL PRODUCT VERSION :
      java version "1.4.2-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
      Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)

      FULL OS VERSION :
      Windows NT Version 4.0

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Applet Jar is located on Websphere 4.03 Server that is behind
      2 load-balanced Reverse Proxy servers which provide client certificate authentication and authorization. All communication is under secure sockets.

      A DESCRIPTION OF THE PROBLEM :
      I am using the latest plugin to address problems noted in
        Bug#4681427. I have successfully converted my certificate from
      a PKCS12 format to JKS and am able to run the applet thru my
      firewalls as described in the fix so long as I do not enable Jar
      caching in the Plugin Control Panel. Once I enable Jar caching
      I get a DownloadException and the Applet does not load.



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Expected Jar file to download and be cached in the directory specified by the plugin control panel and for the jar to load.
      Saw download exception noted above.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      (NOTE:To protect our security all information relevant to specific names has been altered)

      Java(TM) Plug-in: Version 1.4.2
      Using JRE version 1.4.2-beta Java HotSpot(TM) Client VM
      User home directory = C:\WINNT\Profiles\user

      Loading user-defined proxy configuration ...
          Auto config URL:
          Proxy list:
          Proxy override:
      Done.
      Loading manual proxy configuration ...
      Done.
      Proxy Configuration: Manual Configuration
           Proxy:
           Proxy Overrides:
      Cache is enabled
      Location: C:\WINNT\Profiles\user\Application Data\Sun\Java\Deployment\cache\javapi\v1.0

      Maximum size: 50 MB
      Compression level: 0
      Dump system properties ...
      ----------------------------------------------------
      acl.read = +
      acl.read.default =
      acl.write = +
      acl.write.default =
      application.home = C:\PROGRA~1\Java\J2RE14~1.2
      awt.toolkit = sun.awt.windows.WToolkit
      browser = sun.plugin
      browser.vendor = Sun Microsystems, Inc.
      browser.version = 1.1
      deployment.javaws.cache.dir = C:\WINNT\Profiles\user\.javaws\cache
      deployment.javaws.jre.2.enabled = true
      deployment.javaws.jre.2.location = http://java.sun.com/products/autodl/j2se
      deployment.javaws.jre.2.osarch = x86
      deployment.javaws.jre.2.osname = Windows
      deployment.javaws.jre.2.path = C:\Program Files\Java\j2re1.4.1_02\bin\javaw.exe
      deployment.javaws.jre.2.platform = 1.4
      deployment.javaws.jre.2.product = 1.4.1_02
      deployment.javaws.jre.2.registered = true
      deployment.javaws.jre.3.enabled = true
      deployment.javaws.jre.3.location = http://java.sun.com/products/autodl/j2se
      deployment.javaws.jre.3.osarch = x86
      deployment.javaws.jre.3.osname = Windows
      deployment.javaws.jre.3.path = C:\Program Files\Java\j2re1.4.2\bin\javaw.exe
      deployment.javaws.jre.3.platform = 1.4
      deployment.javaws.jre.3.product = 1.4.2-beta
      deployment.javaws.jre.3.registered = true
      deployment.javaws.logFileName = c:\sessionlog.webstart
      deployment.javaws.logToFile = true
      deployment.javaws.player.bounds = 698,87,411,384
      deployment.javaws.player.manager = 1
      deployment.javaws.player.mode = 1
      deployment.javaws.proxy.http = myproxyserver.org
      deployment.javaws.proxy.httpport = 8080
      deployment.javaws.proxy.httpproxyoverride =
      deployment.javaws.proxy.setting = MANUAL
      deployment.javaws.showConsole = true
      deployment.javaws.splash.cache = C:\WINNT\Profiles\user\.javaws\cache\splashes\splash.xml
      deployment.javaws.version = javaws-1.4.2-beta
      deployment.javaws.whatInstall = 3
      deployment.javaws.whenInstall = 3
      deployment.system.cacerts = C:\PROGRA~1\Java\J2RE14~1.2\lib\security\cacerts
      deployment.system.home = C:\WINNT\Sun\Java\Deployment
      deployment.system.jssecacerts = C:\PROGRA~1\Java\J2RE14~1.2\lib\security\cacerts
      deployment.system.profile = C:\WINNT
      deployment.system.security.policy = file:/C:/WINNT/Sun/Java/Deployment/security/java.policy
      deployment.user.cachedir = C:\WINNT\Profiles\user\Application Data\Sun\Java\Deployment\cache
      deployment.user.certs = C:\WINNT\Profiles\user\Application Data\Sun\Java\Deployment\security\deployment.certs
      deployment.user.extdir = C:\WINNT\Profiles\user\Application Data\Sun\Java\Deployment\ext
      deployment.user.home = C:\WINNT\Profiles\user\Application Data\Sun\Java\Deployment
      deployment.user.jssecerts = C:\WINNT\Profiles\user\Application Data\Sun\Java\Deployment\security\deployment.jssecerts
      deployment.user.logdir = C:\WINNT\Profiles\user\Application Data\Sun\Java\Deployment\log
      deployment.user.profile = C:\WINNT\Profiles\user\Application Data
      deployment.user.security.policy = file:/C:/WINNT/Profiles/user/Application%20Data/Sun/Java/Deployment/security/java.policy
      deployment.user.tmpdir = C:\WINNT\Profiles\user\Application Data\Sun\Java\Deployment\cache\tmp
      file.encoding = Cp1252
      file.encoding.pkg = sun.io
      file.separator = file.separator.applet = true
      http.agent = Mozilla/4.0 (Windows NT 4.0)
      http.auth.serializeRequests = true
      https.protocols = SSLv3,SSLv2Hello
      java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
      java.awt.printerjob = sun.awt.windows.WPrinterJob
      java.class.path = C:\PROGRA~1\Java\J2RE14~1.2\classes
      java.class.version = 48.0
      java.class.version.applet = true
      java.endorsed.dirs = C:\PROGRA~1\Java\J2RE14~1.2\lib\endorsed
      java.ext.dirs = C:\PROGRA~1\Java\J2RE14~1.2\lib\ext
      java.home = C:\PROGRA~1\Java\J2RE14~1.2
      java.io.tmpdir = C:\TEMPjava.library.path = C:\PROGRA~1\INTERN~1;.;C:\WINNT\System32;C:\WINNT;C:\PROGRA~1\INTERN~1\;;c:\program files\cmsynergy\ccm62\fedach\lib\notify\Windows;c:\program files\ibm\application developer;C:\Perl\bin\;c:\ruby\bin;C:\WINNT\system32;C:\WINNT;C:\MSSQL7\BINN;C:\SNA\system;C:\WINNT\System32\WBEM;C:\Lotus\Notes;c:\program files\cmsynergy\ccm62\bin;C:\Program Files\Hummingbird\Connectivity\7.11\Accessories;c:\program file\java\j2re1.4.1_02\bin\;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;C:\PROGRA~1\IBM\IMNNQ;C:\Program Files\SQLLIB\BIN;C:\Program Files\SQLLIB\FUNCTION;C:\Program Files\SQLLIB\SAMPLES\REPL;C:\Program Files\SQLLIB\HELP;c:\program files\java\j2re1.4.1_02\bin;;C:\PROGRA~1\E!OC
      java.net.debug = ssl,handshake,trustmanager
      java.protocol.handler.pkgs = sun.plugin.net.protocol|sun.plugin.net.protocol
      java.runtime.name = Java(TM) 2 Runtime Environment, Standard Edition
      java.runtime.version = 1.4.2-beta-b19
      java.specification.name = Java Platform API Specification
      java.specification.vendor = Sun Microsystems Inc.
      java.specification.version = 1.4
      java.util.prefs.PreferencesFactory = java.util.prefs.WindowsPreferencesFactory
      java.vendor = Sun Microsystems Inc.
      java.vendor.applet = true
      java.vendor.url = http://java.sun.com/
      java.vendor.url.applet = true
      java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
      java.version = 1.4.2-beta
      java.version.applet = true
      java.vm.info = mixed mode
      java.vm.name = Java HotSpot(TM) Client VM
      java.vm.specification.name = Java Virtual Machine Specification
      java.vm.specification.vendor = Sun Microsystems Inc.
      java.vm.specification.version = 1.0
      java.vm.vendor = Sun Microsystems Inc.
      java.vm.version = 1.4.2-beta-b19
      javaplugin.console = show
      javaplugin.exception = false
      javaplugin.jre.params = -Djava.net.debug=ssl,handshake,trustmanager -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|liveconnect -Djavax.net.ssl.keyStore=c:\pkcsKeyStore -Djavax.net.ssl.keyStorePassword=password
      javaplugin.jre.path = C:\Program Files\Java\j2re1.4.2
      javaplugin.jre.type = JRE
      javaplugin.jre.version = 1.4.2
      javaplugin.maxHeapSize = 96m
      javaplugin.nodotversion = 142
      javaplugin.proxy.config.list =
      javaplugin.proxy.config.type = manual
      javaplugin.proxy.usebrowsersettings = false
      javaplugin.trace = true
      javaplugin.trace.option = basic|net|security|liveconnect
      javaplugin.version = 1.4.2
      javaplugin.vm.options = -Djava.class.path=C:\PROGRA~1\Java\J2RE14~1.2\classes -Xbootclasspath/a:C:\PROGRA~1\Java\J2RE14~1.2\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.4.2 -Djavaplugin.nodotversion=142 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\Java\J2RE14~1.2 -Djava.net.debug=ssl,handshake,trustmanager -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|liveconnect -Djavax.net.ssl.keyStore=c:\pkcsKeyStore -Djavax.net.ssl.keyStorePassword=password -Djava.protocol.handler.pkgs=sun.plugin.net.protocol
      javax.net.ssl.keyStore = c:\pkcsKeyStore
      javax.net.ssl.keyStorePassword = password
      line.separator = \r\n
      line.separator.applet = true
      os.arch = x86
      os.arch.applet = true
      os.name = Windows NT
      os.name.applet = true
      os.version = 4.0
      os.version.applet = true
      package.restrict.access.netscape = false
      package.restrict.access.sun = true
      package.restrict.definition.java = true
      package.restrict.definition.netscape = true
      package.restrict.definition.sun = true
      path.separator = ;
      path.separator.applet = true
      sun.arch.data.model = 32
      sun.boot.class.path = C:\PROGRA~1\Java\J2RE14~1.2\lib\rt.jar;C:\PROGRA~1\Java\J2RE14~1.2\lib\i18n.jar;C:\PROGRA~1\Java\J2RE14~1.2\lib\sunrsasign.jar;C:\PROGRA~1\Java\J2RE14~1.2\lib\jsse.jar;C:\PROGRA~1\Java\J2RE14~1.2\lib\jce.jar;C:\PROGRA~1\Java\J2RE14~1.2\lib\charsets.jar;C:\PROGRA~1\Java\J2RE14~1.2\classes;C:\PROGRA~1\Java\J2RE14~1.2\lib\plugin.jar
      sun.boot.library.path = C:\PROGRA~1\Java\J2RE14~1.2\bin
      sun.cpu.endian = little
      sun.cpu.isalist =
      sun.io.unicode.encoding = UnicodeLittle
      sun.java2d.fontpath =
      sun.net.client.defaultConnectTimeout = 120000
      sun.os.patch.level = Service Pack 6
      trustProxy = true
      user.country = US
      user.dir = C:\WINNT\Profiles\user\Desktop
      user.home = C:\WINNT\Profiles\user
      user.language = en
      user.name = user
      user.timezone =
      user.variant =
      ----------------------------------------------------
      Done.



      ----------------------------------------------------
      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 properties
      t: dump thread list
      v: dump thread stack
      x: clear classloader cache
      0-5: set trace level to <n>
      ----------------------------------------------------
      Registered modality listener
      Invoking JS method: document
      Invoking JS method: URL
      Referencing classloader: sun.plugin.ClassLoaderInfo@6355dc, refcount=1
      Loading applet ...
      Initializing applet ...
      Starting applet ...
      Connecting https://myfirewall.org/junction/context_root/directory/TheJar.jar with no proxy

      Connecting https://myfirewall.org/junction/context_root/directory/TheJar.jar with cookie "FirewallStateCookie=/junction; AMWEBJCT!/junction!JSESSIONID=0000XOJFTQFI1LN4KLZU11WD4TY:u8u4tt6p; FirewallSessionCookie-ID=2_rC9OmSqzMnlXgIuDMTqLbv5FDAvETx478YhRpLFN8DoAAAAJ; IV_JCT=/junction"

      Loading Root CA certificates from C:\PROGRA~1\Java\J2RE14~1.2\lib\security\cacerts

      Loaded Root CA certificates from C:\PROGRA~1\Java\J2RE14~1.2\lib\security\cacerts

      Loading Https Root CA certificates from C:\PROGRA~1\Java\J2RE14~1.2\lib\security\cacerts

      Loaded Https Root CA certificates from C:\PROGRA~1\Java\J2RE14~1.2\lib\security\cacerts

      Loading JPI Https certificates from C:\WINNT\Profiles\user\Application Data\Sun\Java\Deployment\security\deployment.jssecerts

      Loaded JPI Https certificates from C:\WINNT\Profiles\user\Application Data\Sun\Java\Deployment\security\deployment.jssecerts
      Loading certificates from JPI session certificate store
      Loaded certificates from JPI session certificate store
      Checking if certificate is in JPI session certificate store
      Checking if Https certificate is in JPI permanent certificate store
      Server https://myfirewall.org/junction/context_root/directory/TheJar.jar requesting to set-cookie with "FirewallSessionCookie; Path=/; Secure"

      Server https://myfirewall.org/junction/context_root/directory/TheJar.jar requesting to set-cookie with "FirewallSessionCookie=/junction; Path=/junction"

      Downloading https://myfirewall.org/junction/context_root/directory/TheJar.jar to cache

      Connecting https://myfirewall.org/junction/context_root/directory/org/company/directory/upload/UploadApplet.class with no proxy

      Connecting https://myfirewall.org/junction/context_root/directory/org/company/directory/upload/UploadApplet.class with cookie "FirewallStateCookie=/junction; PD_STATEFUL_9b951e8a-3ab3-11d7-b5ef-ac1e1123aa77=/fedach_web_dev; AMWEBJCT!/FirewallSessionCookie; FirewallSessionCookie; JCT=/junction"

      sun.plugin.cache.DownloadException
      at sun.plugin.cache.CachedFileLoader.load(Unknown Source)
      at sun.plugin.cache.FileCache.get(Unknown Source)
      at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connectWithCache(Unknown Source)

      at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connect(Unknown Source)

      at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.getInputStream(Unknown Source)

      at java.net.HttpURLConnection.getResponseCode(Unknown Source)

      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)

      at sun.applet.AppletClassLoader.getBytes(Unknown Source)

      at sun.applet.AppletClassLoader.access$100(Unknown Source)

      at sun.applet.AppletClassLoader$1.run(Unknown Source)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.applet.AppletClassLoader.findClass(Unknown Source)

      at java.lang.ClassLoader.loadClass(Unknown Source)

      at sun.applet.AppletClassLoader.loadClass(Unknown Source)

      at java.lang.ClassLoader.loadClass(Unknown Source)

      at sun.applet.AppletClassLoader.loadCode(Unknown Source)

      at sun.applet.AppletPanel.createApplet(Unknown Source)

      at sun.plugin.AppletViewer.createApplet(Unknown Source)

      at sun.applet.AppletPanel.runLoader(Unknown Source)

      at sun.applet.AppletPanel.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)

      Connecting https://myfirewall.org/junction/context_root/directory/org/company/directory/upload/UploadApplet.class with no proxy

      Connecting https://myfirewall.org/junction/context_root/directory/org/company/directory/upload/UploadApplet.class "FirewallSessionCookie=/junction; FirewallSessionCookie=/junction; AMWEBJCT!/junction!JSESSIONID=0000XOJFTQFI1LN4KLZU11WD4TY:u8u4tt6p; FirewallSessionCookie; IV_JCT=/junction"

      sun.plugin.cache.DownloadException
      at sun.plugin.cache.CachedFileLoader.load(Unknown Source)
      at sun.plugin.cache.FileCache.get(Unknown Source)
      at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connectWithCache(Unknown Source)
      at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connect(Unknown Source)
      at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.getInputStream(Unknown Source)
      at java.net.HttpURLConnection.getResponseCode(Unknown Source)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
      at sun.applet.AppletClassLoader.getBytes(Unknown Source)
      at sun.applet.AppletClassLoader.access$100(Unknown Source)
      at sun.applet.AppletClass
      tharris 3-6-2006 I have added the test cases Juniper Networks provided to demonstrate the bug being experienced at British Telecom. Juniper provides the test cases (cacheing_zip and ATT5359632.txt) with the following explainations:

      The problem we have is that if the JAR file name contains an asterisk
      character (*) and applet caching is enabled in the Java plugin, the
      applet fails to start. This happens with Java Plug-In 1.5.0_06.

      I've attached a zip file containing the following:

      1. A sample applet whose name contains an asterisk.
      2. Some sample HTML used to embed this applet, and some images used
      by the applet.
      3. The Java Plugin console output when caching is enabled and this
      applet is accessed.
      4. The Java Plugin console output when caching is disabled and this
      applet is accessed.
      5. A tcpdump file showing the traffic when this applet is accessed
      and caching is enabled.

      To reproduce, simply place this content anywhere on a web server and
      use Java Plugin 1.5.0_06 to access the applet. Make sure that caching
      is enabled in the Plugin. Again, SSL is not required, although the
      problem happens both with and without SSL.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mbankal Mala Bankal (Inactive)
                Reporter:
                gmanwanisunw Girish Manwani (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: