United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5077272 : REGRESSION: ResourceBundle.getBundle(String, Locale) is broken in jdk 1.4.2_05

Details
Type:
Bug
Submit Date:
2004-07-22
Status:
Closed
Updated Date:
2012-10-09
Project Name:
JDK
Resolved Date:
2004-08-17
Component:
core-libs
OS:
solaris_8,generic
Sub-Component:
java.util:i18n
CPU:
x86,sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2,5.0u1
Fixed Versions:
1.4.2_06 (06)

Related Reports
Backport:
Relates:

Sub Tasks

Description
Name: gm110360			Date: 07/22/2004


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


ADDITIONAL OS VERSION INFORMATION :
->uname -a
SunOS asgsun-dev9 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-60


A DESCRIPTION OF THE PROBLEM :
Running the following program fails under jdk 1.4.2_05, but used to work for previous JDK versions.

import java.util.*;

public class ResourceTest {

    public static void main(String[] args) throws Exception {

     ResourceBundle.getBundle("oracle/oc4j/admin/management/mbeans/Messages",
                              Locale.getDefault());

    }

}

Under JDK 1.2.4_05

->java -classpath .:lib/oc4j-internal.jar  ResourceTest
Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name oracle/oc4j/admin/management/mbeans/Messages, locale en_US
        at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
        at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)
        at ResourceTest.main(ResourceTest.java:7)

 ->java -version
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)


Under JDK 1.4.2_04

 ->java -classpath .:lib/oc4j-internal.jar  ResourceTest

No error.

->java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

oc4j-internal.jar contains class oracle.oc4j.admin.management.mbeans.Messages.class

 ->jar tvf lib/oc4j-internal.jar | grep  oracle/oc4j/admin/management/mbeans/Messages
101184 Wed Jul 21 12:05:36 PDT 2004 oracle/oc4j/admin/management/mbeans/Messages.class



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See above description.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The oracle/oc4j/admin/management/mbeans/Messages.class should have been loaded.
ACTUAL -
 ->java -classpath .:lib/oc4j-internal.jar  ResourceTest
Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name oracle/oc4j/admin/management/mbeans/Messages, locale en_US
        at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
        at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)
        at ResourceTest.main(ResourceTest.java:7)


ERROR MESSAGES/STACK TRACES THAT OCCUR :
 ->java -classpath .:lib/oc4j-internal.jar  ResourceTest
Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name oracle/oc4j/admin/management/mbeans/Messages, locale en_US
        at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
        at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)
        at ResourceTest.main(ResourceTest.java:7)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
See above description
---------- END SOURCE ----------

Release Regression From : 1.4.2_04
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

(Incident Review ID: 286707) 
======================================================================
###@###.### 10/12/04 16:09 GMT

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.4.2_06
generic

FIXED IN:
1.4.2_06

INTEGRATED IN:
1.4.2_06

VERIFIED IN:
1.4.2_06


                                     
2004-09-04
EVALUATION

The behavior change was made due to the same ClassLoader change in 1.4.2_05 as in Tiger. Please refer to http://java.sun.com/j2se/1.5.0/compatibility.html#incompatibilities for details.

Please note that '/' isn't the correct separator for a qualified class name. '/' is allowed in getBundle only for PropertyResourceBundle for JDK 1.1. compatibility.
###@###.### 2004-07-23

Reopening the bug as the bug is escalated for 1.4.2_05. Issue is compatibility
with previous versions of 1.4.2x. 
Will keep this bug open until the Cu's issue is resolved.

###@###.### 2004-08-02
                                     
2004-08-02



Hardware and Software, Engineered to Work Together