You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Deepa Remesh (JIRA)" <de...@db.apache.org> on 2005/07/25 20:55:38 UTC
[jira] Created: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Exception when using LOCALIZEDDISPLAY with JSR169
-------------------------------------------------
Key: DERBY-470
URL: http://issues.apache.org/jira/browse/DERBY-470
Project: Derby
Type: Bug
Components: Localization
Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
Reporter: Deepa Remesh
Assigned to: Deepa Remesh
As I did not get any response to my mail, I am opening a JIRA issue for this.
When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
"JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
if (type == Types.NUMERIC || type == Types.DECIMAL) {
return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
}
where getNumberAsString method does the following:
public String getNumberAsString(Object o){
if (enableLocalized){
return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
}
else {
return o.toString();
}
}
As a solution, I am planning to do the following:
1. Check for BigDecimal class in the JVM by doing a Class.forName
2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
Thanks,
Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Kathey Marsden updated DERBY-470:
---------------------------------
Comment: was deleted
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Deepa Remesh resolved DERBY-470:
--------------------------------
Fix Version: 10.2.0.0
10.1.1.0
Resolution: Fixed
This patch was committed as revision 239718 to trunk and revision 264135 to the 10.1 branch
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Fix For: 10.2.0.0, 10.1.1.0
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Reopened: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Kathey Marsden reopened DERBY-470:
----------------------------------
just reopening to fix up fix version
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Fix For: 10.2.0.0, 10.1.2.0
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Kathey Marsden resolved DERBY-470:
----------------------------------
Resolution: Fixed
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Fix For: 10.2.0.0, 10.1.2.0
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Kathey Marsden updated DERBY-470:
---------------------------------
Fix Version: 10.1.2.0
(was: 10.1.1.0)
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Fix For: 10.2.0.0, 10.1.2.0
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Deepa Remesh closed DERBY-470:
------------------------------
Resolution: Fixed
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Fix For: 10.2.0.0, 10.1.2.0, 10.1.1.1
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Deepa Remesh updated DERBY-470:
-------------------------------
Attachment: derby-470.diff
derby-470.status
I have added the following in LocalizedResource.java to check if BigDecimal is available in the JVM.
private static boolean HAVE_BIG_DECIMAL;
{
boolean haveBigDecimal;
try {
Class.forName("java.math.BigDecimal");
haveBigDecimal = true;
} catch (Throwable t) {
haveBigDecimal = false;
}
HAVE_BIG_DECIMAL = haveBigDecimal;
}
The above code is also there in org.apache.derby.impl.tools.ij.util.java. Will it be okay to make HAVE_BIG_DECIMAL in util.java public and re-use it? This would be good if there are more scenarios which may need a similar check. Please let me know and I can submit a new patch, if needed.
With this patch, I have run derbyall with Sun JDK 1.4.2 and IBM's WCTME 5.7 J2ME/CDC/FP. In J2ME, one testcase failed. The failure is not related to this change.
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Deepa Remesh updated DERBY-470:
-------------------------------
Fix Version: 10.1.1.1
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Fix For: 10.2.0.0, 10.1.2.0, 10.1.1.1
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Deepa Remesh closed DERBY-470:
------------------------------
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Fix For: 10.2.0.0, 10.1.1.0
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Reopened: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Deepa Remesh reopened DERBY-470:
--------------------------------
reopening to fix fix version
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Fix For: 10.2.0.0, 10.1.2.0, 10.1.1.1
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=comments#action_12319887 ]
Kathey Marsden commented on DERBY-470:
--------------------------------------
Committed revision 239718 to fix this issue. You can submit centralization of HAVE_BIG_DECIMAL as another patch or with other JS169 changes.
It seems to me that for sharing the function for multiple tools it would be better to put the internal api in a shared utility class under
D:/p4/marsden_patch/opensource/java/tools/org/apache/derby/iapi/tools/
rather than making the function in ij.util public.
Perhaps the fact that NUMERIC and DECIMAL types will not be localized in these JVM environments should be mentioned in the documentation,
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=comments#action_12320421 ]
Kathey Marsden commented on DERBY-470:
--------------------------------------
Committed revision 264135 to the 10.1 branch
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=comments#action_12319889 ]
Kathey Marsden commented on DERBY-470:
--------------------------------------
Committed revision 239718 to fix this issue. You can submit centralization of HAVE_BIG_DECIMAL as another patch or with other JS169 changes.
It seems to me that for sharing the function for multiple tools it would be better to put the internal api in a shared utility class under
org.apache.derby.iapi.tools
rather than making the function in ij.util public.
Perhaps the fact that NUMERIC and DECIMAL types will not be localized in these JVM environments should be mentioned in the documentation.
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=all ]
Kathey Marsden closed DERBY-470:
--------------------------------
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Fix For: 10.2.0.0, 10.1.2.0
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-470) Exception when using LOCALIZEDDISPLAY with JSR169
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-470?page=comments#action_12320077 ]
Deepa Remesh commented on DERBY-470:
------------------------------------
I think this patch can be applied to 10.1 branch also.
I am opening a sub-task to update documentation.
> Exception when using LOCALIZEDDISPLAY with JSR169
> -------------------------------------------------
>
> Key: DERBY-470
> URL: http://issues.apache.org/jira/browse/DERBY-470
> Project: Derby
> Type: Bug
> Components: Localization
> Environment: IBM's J2ME/CDC/Foundation Profile and JSR169
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Attachments: derby-470.diff, derby-470.status
>
> As I did not get any response to my mail, I am opening a JIRA issue for this.
> When I run the test i18n/I18NImportExport.java with JSR169 using IBM's J2ME/CDC/Foundation Profile, I get the following exception:
> "JAVA ERROR: java.lang.NoSuchMethodError: java/sql/ResultSet.getBigDecimal(II)Ljava/math/BigDecimal;"
> In the test, LOCALIZEDDISPLAY is on and the table has a DECIMAL column. This causes the exception. On looking at the code, following is done to format DECIMAL types in LocalizedResource:
> if (type == Types.NUMERIC || type == Types.DECIMAL) {
> return getNumberAsString(rs.getBigDecimal(columnNumber, rsm.getScale(columnNumber)));
> }
> where getNumberAsString method does the following:
> public String getNumberAsString(Object o){
> if (enableLocalized){
> return formatNumber.format(o, new StringBuffer(), new FieldPosition(0)).toString();
> }
> else {
> return o.toString();
> }
> }
> As a solution, I am planning to do the following:
> 1. Check for BigDecimal class in the JVM by doing a Class.forName
> 2. Call getNumberAsString for NUMERIC and DECIMAL types only if BigDecimal class is available. Otherwise, return rs.getString.
> This solution would mean that NUMERIC and DECIMAL types will not be localized in these JVM environments. Please let me know if any comments on this.
> Thanks,
> Deepa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira