JDK-4291305 : ResourceBundle.getBundle fails when webpage downloaded with https
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.2.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1999-11-14
  • Updated: 2000-02-10
  • Resolved: 2000-02-10
Related Reports
Duplicate :  
Description

Name: dbT83986			Date: 11/13/99


1. write a Java 1.2.2 applet that uses ResourceBundle.getBundle().
2. jar it up
3. embed the applet in a html page.
4. download the web page using HTTPS. -- the
ResourceBundle.getBundle() line will throw a classCastException
(bad magic number).

this is NOT a problem with downloading the jar in https.  If you
download the webpage in http, but specify the jar URL as https,
then the applet will run fine.  conversely, if you download the
webpage in https, but specify the jar url as http, then the
applet will throw the exception.

the problem is dependant entirely upon the use of HTTPS in downloading
the html webpage containing the APPLET tag.  my guess is that the
ResourceBundle code fails to extract the APPLET tag parameters from
the webpage when it is downloaded using https.

other info:
I am using Netscape Communicator 4.5
with the early release Java 1.2.2 plugin
(Review ID: 88160) 
======================================================================

Comments
EVALUATION This bug is caused by the fact that ResourceBundle will try to load several class files until it succeeds. However, when a class doesn't exist, the AppletClassLoader fails to recognize the HTTP error code, and it interprets the resulting error page as a class file. This causes a ClassCastException. It is a duplicate of 4203734.
11-06-2004