Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6247934

CachedRowSetImpl requires Locale.US

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7
    • 1.4.2
    • core-libs
    • b39
    • generic, x86
    • generic, windows_2000
    • Verified

      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.ibm.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 :-(
      ###@###.### 2005-03-30 10:38:41 GMT

            ahandasunw Amit Handa (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: