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

When JRE cache cleared, applet fails to play video through proxy ser

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs
    • x86
    • windows_xp

      Name: kcT146510 Date: 08/02/2004


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

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP Pro Sp1

      A DESCRIPTION OF THE PROBLEM :
      1) Clear cache for JRE 1.5 beta 3
      2) Run this applet at: http://cjs.sfbay.sun.com/getjava/videobanner/v1.html
      3) The applet doesn't run the first time it loads. But if you press reload couple of times or run it again when you restart the browser (applet already cached), the applet works.


      The applet starts two threads: the main applet thread and a download
      thread. Within both threads a download process is initiated: within the
      applet thread the start-up GIF is downloaded, while within the download
      thread the video stream is downloaded. Both threads use pretty similar
      code for downloading:

      Applet Thread:

               src_url = new URL(getCodeBase(),getParameter("src")+".gif");
               urlcon = src_url.openConnection();
               urlcon.setUseCaches(false);
               data_len = urlcon.getContentLength();
               dis = new DataInputStream(urlcon.getInputStream());


      Download Thread:

               src_url = new URL(getCodeBase(),getParameter("src"));
               urlcon = src_url.openConnection();
               urlcon.setUseCaches(false);
               data_len = urlcon.getContentLength();
               bis = new BufferedInputStream(urlcon.getInputStream());

      The download process of the applet thread is initialed always first
      and always succeeds with no problems. However, under the second
      download process (for downloading the video stream) fails UNDER
      SPECIAL CONDITIONS.
      With special conditions I mean that
      - you are on JDK 1.5 AND
      - your JRE cache is completely empty AND
      - the applet starts for the first time (no reload) AND
      - the applet is accessed via (SUN's) web-proxy (no direct connection)

      All these four conditions have to be true to run into the problem. If one
      of these condition is false the applet plays fine.

      Could be related to these bugs?
      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5025019 or
      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4670429

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Clear cache for JRE 1.5 beta 3
      2) Run this applet at: http://cjs.sfbay.sun.com/getjava/videobanner/v1.html
      3) The applet doesn't run the first time it loads. But if you press reload couple of times or run it again when you restart the browser (applet already cached), the applet works.

      In addition, if the proxy is turned off, the applet works the first time it loads.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The applet plays a video clip.
      ACTUAL -
      The applet only displays the java coffee cup logo

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Here's the console info:
      VideoBanner by VideoBanner.com
      http://www.videobanner.com
      (c) 2004 by VideoBanner.com
      Licensed to: SUN Microsystems, Inc.
      C000-0904-04-115b-SUNe200603

      Clip : V3/2180916
      N3
      java.security.AccessControlException: access denied (java.net.SocketPermission webcache.sfbay.sun.com:8080 connect,resolve)
      at java.security.AccessControlContext.checkPermission(Unknown Source)
      at java.security.AccessController.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkConnect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.proxiedConnect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.setProxiedClient(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.setProxiedClient(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
      at java.net.URLConnection.getHeaderFieldInt(Unknown Source)
      at java.net.URLConnection.getContentLength(Unknown Source)
      at A6.run(Unknown Source)
      NIS: http://129.145.128.231/getjava/videobanner/classes-mp4/sunv2_v1.vab
      java.lang.RuntimeException: java.security.AccessControlException: access denied (java.net.SocketPermission webcache.sfbay.sun.com:8080 connect,resolve)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at A6.run(Unknown Source)
      Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission webcache.sfbay.sun.com:8080 connect,resolve)
      at java.security.AccessControlContext.checkPermission(Unknown Source)
      at java.security.AccessController.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkConnect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.proxiedConnect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.setProxiedClient(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.setProxiedClient(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
      at java.net.URLConnection.getHeaderFieldInt(Unknown Source)
      at java.net.URLConnection.getContentLength(Unknown Source)
      ... 1 more
      L-Time: 0
      D0
      D1

      REPRODUCIBILITY :
      This bug can be reproduced always.
      (Incident Review ID: 295607)
      ======================================================================

            michaelm Michael McMahon
            kenchen Ken Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: