JDK-6589801 : (rb) Can't find resource for a key from resource bundle.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 1.4.2_15
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2007-08-06
  • Updated: 2011-02-16
  • Resolved: 2008-06-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
1.4.2_18-rev b08Fixed 1.4.2_19Fixed
Related Reports
Relates :  
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 The webrev for the fix is available at the following location: http://jpsesvr.sfbay.sun.com:8080/ctetools/html/ViewDetail.jsp?index=2272
26-12-2007

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.
12-10-2007