Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6247934
Votes 1
Synopsis CachedRowSetImpl requires Locale.US
Category jdbc:implementation
Reported Against 1.4.2
Release Fixed 7(b39)
State 11-Closed, Verified, bug
Priority: 3-Medium
Related Bugs 6358501 , 6212850
Submit Date 30-MAR-2005
Description
FULL PRODUCT VERSION :
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Works/fails on any Linux, Windows, ...

EXTRA RELEVANT SYSTEM CONFIGURATION :
using reference implementation rowset.jar version 1.0.1 - 7/28/2004

A DESCRIPTION OF THE PROBLEM :
When using any locale other then US, the constructor fails.

  See also:
http://www-106. customer .com/developerworks/forums/dw_expandTree.jsp?thread=56597&forum=244&cat=10&message=4095442#4095442

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public static void main (String[] args)
{
	try
	{
		Locale.setDefault(Locale.CANADA);
		new CachedRowSetImpl();
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}
}
if you set the Locale to Locale.US, it works. just fine.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No Error thrown
ACTUAL -
java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:61)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:80)
	at java.util.Properties.load(Properties.java:266)
	at java.util.PropertyResourceBundle.<init>(PropertyResourceBundle.java:96)
	at com.sun.rowset.JdbcRowSetResourceBundle.<init>(Unknown Source)
	at com.sun.rowset.JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(Unknown Source)
	at com.sun.rowset.CachedRowSetImpl.<init>(Unknown Source)
	at org.compiere.util.CCachedRowSet.main(CCachedRowSet.java:59)


ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:61)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:80)
	at java.util.Properties.load(Properties.java:266)
	at java.util.PropertyResourceBundle.<init>(PropertyResourceBundle.java:96)
	at com.sun.rowset.JdbcRowSetResourceBundle.<init>(Unknown Source)
	at com.sun.rowset.JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle(Unknown Source)
	at com.sun.rowset.CachedRowSetImpl.<init>(Unknown Source)
	at org.compiere.util.CCachedRowSet.main(CCachedRowSet.java:59)


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
public static void main (String[] args)
{
	try
	{
		Locale.setDefault(Locale.CANADA);
		new CachedRowSetImpl();
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Set Locale Explicitly to US :-(
  xxxxx@xxxxx   2005-03-30 10:38:41 GMT
Work Around
N/A
Evaluation
The fix is available to be integrated, have asked Alexey to verify the rowset.jar with the JCK test codebase.
Accordingly this binary will be promoted and fix available to integrate in JDK5.0uX release
Posted Date : 2005-12-07 09:52:58.0
Comments
  
  Include a link with my name & email   

Submitted On 22-FEB-2006
ELB_JAPON
There is a beter workaround then set the locale explicitely to US.
Add in the rowset.jar a RowSetResourceBundle_XX.properties with XX being your locale (copy the file from the available RowSetResourceBundle.properties)



PLEASE NOTE: JDK6 is formerly known as Project Mustang