United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6589801 (rb) Can't find resource for a key from resource bundle.
JDK-6589801 : (rb) Can't find resource for a key from resource bundle.

Details
Type:
Bug
Submit Date:
2007-08-06
Status:
Resolved
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2008-06-30
Component:
core-libs
OS:
windows
Sub-Component:
java.net
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.2_15
Fixed Versions:
1.4.2_18-rev (b08)

Related Reports
Backport:
Relates:

Sub Tasks

Description
Can't find resource for a key from resource bundle.

This problem is reproducible in 5.0u6 and 1.4.2_15

This problem seems to be fixed in 5.0u7 and beyond.

CU needs a fix for 1.4.2.


To reproduce,

load this URL:

1.turn off pop-up blocker in IE6

2.enable Java console

3 load this url:
  https://my.calgaryhealthregion.ca/http://myAM.calgaryhealthregion.ca/amserver/UI/Login?gw=my.calgaryhealthregion.ca&org=admin

4. login with: sunremoteuser
   password: <pls refer to escalation note>

The following exception will be logged in the Java console.

>> java.util.MissingResourceException: Can't find resource for bundle
>> java.util.PropertyResourceBundle, key ppd.1
>>	  at java.util.ResourceBundle.getObject(Unknown Source)
>>	  at java.util.ResourceBundle.getString(Unknown Source)
>>	  at com.sun.portal.netlet.client.common.NL00.a(NL00)
>>	  at com.sun.portal.netlet.client.common.NL44.<init>(NL44)
>>	  at com.sun.portal.netlet.client.applet.NL26.<init>(NL26)
>>	  at
>> com.sun.portal.netlet.client.applet.NetletApplet.b(NetletApplet)
>>	  at
>> com.sun.portal.netlet.client.applet.NetletApplet.h(NetletApplet)
>>	  at
>> com.sun.portal.netlet.client.applet.NetletApplet.start(NetletApplet)
>>	  at sun.applet.AppletPanel.run(Unknown Source)
>>	  at java.lang.Thread.run(Unknown Source)

                                    

Comments
EVALUATION

In the first series of experiments I discovered that the problem is
in the way the resource bundle is loaded. The data contained in the
loaded resource bundle in 1.4.2_15 was completely broken and looked
like if some HTML page was incorrectly loaded as a resource bundle
instead of a correct bundle file. In 5.0u13 the loaded resource bundle
was correct and, particularly, contained "ppd.1" key that was missed
in 1.4.2_15 version causing an exception.

Then I narrowed the problem down to
sun.net.www.protocol.http.HttpURLConnection class. It is where the
InputStream for the PropertyResourceBundle constructor comes from.
This class was substantially changed in 5.0.

Finally, it turned out that the problem is caused by incorrect
processing of cookies in 1.4.2. When an applet sets up its own cookie,
this value overwrites an old cookie value set when a session was
established. Because of this, a HTTP request lacks some context
information, a HTTP server returns "302 Moved Temporarily" response
instead of "200 OK", we follow in the wrong direction and download
the wrong file treating it as a resource bundle.

In 1.4.2 this code is located in plugin workspace. In 5.0 it
has been significantly reworked and moved to j2se workspace.
The fix is to add a new cookie value to the old one instead of
overwriting it. It is similar to the way cookies are processed
in 5.0.
                                     
2007-10-12
EVALUATION

The webrev for the fix is available at the following location:
http://jpsesvr.sfbay.sun.com:8080/ctetools/html/ViewDetail.jsp?index=2272
                                     
2007-12-26



Hardware and Software, Engineered to Work Together