Issue Details (XML | Word | Printable)

Key: DERBY-518
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Deepa Remesh
Reporter: Deepa Remesh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Data type mismatch error for boolean to DECIMAL conversion in J2ME

Created: 19/Aug/05 08:36 AM   Updated: 30/Sep/05 02:29 AM
Return to search
Component/s: JDBC
Affects Version/s: None
Fix Version/s: 10.1.2.1, 10.2.1.6

Time Tracking:
Not Specified

File Attachments:
  Size
File derby-518_2.diff 2005-08-27 02:59 AM Deepa Remesh 13 kB
File derby-518_2.status 2005-08-27 02:59 AM Deepa Remesh 0.5 kB
File Licensed for inclusion in ASF works derby-518_3.diff 2005-08-31 08:02 AM Deepa Remesh 13 kB
Environment: J2ME/CDC/Foundation Profile
Issue Links:
dependent
 

Resolution Date: 30/Sep/05 02:29 AM


 Description  « Hide
The test jdbcapi/resultset.java gives the following error when run in J2ME/CDC/FP :

Testing nullif(?,DECIMAL(10,5)) with setBoolean
ERROR XCL12: An attempt was made to put a data value of type 'boolean' into a data value of type 'DECIMAL'.

I found that setValue(boolean) is not implemented in BigIntegerDecimal, which is the class used for DECIMAL in J2ME. This is implemented in SQLDecimal and a similar implementation can be provided in BigIntegerDecimal.

On looking at the setValue methods in these classes, I also found that setValue(Object) is implemented in SQLDecimal but not in BigIntegerDecimal.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #264945 Wed Aug 31 05:25:51 UTC 2005 kmarsden DERBY-518 - Data type mismatch error for boolean to DECIMAL conversion in J2ME
Partial checkin for DERBY-453 - Create a test wrapper to run tests using BigDecimal in J2ME/CDC/Foundation


1. Added setValue(boolean) to BinaryDecimal. This fixes DERBY-518.
2. Created a wrapper class BigDecimalHandler to be used in tests.
3. Test jdbcapi/resultset.java modified to call the wrapper methods in BigDecimalHandler
4. resultset.out master files modified
5. Comment in resultsetapp_properties modified. resultset test still fails in J2ME because of additions to the test. This will be tracked in DERBY-453.
Files Changed
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/resultset.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/resultset.out
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset_app.properties
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset.java
MODIFY /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/resultset.out
MODIFY /db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/BinaryDecimal.java

Repository Revision Date User Message
ASF #289667 Fri Sep 16 22:25:39 UTC 2005 kmarsden DERBY-518
Data type mismatch error for boolean to DECIMAL conversion in J2ME
merge from trunk

svn merge -r 264944:264945 https://svn.apache.org/repos/asf/db/derby/code/trunk
svn merge -r 265042:265043 https://svn.apache.org/repos/asf/db/derby/code/trunk
svn merge -r 279925:279926 https://svn.apache.org/repos/asf/db/derby/code/trunk
Contributed by Deepa Remesh
Files Changed
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/resultset.out
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset_app.properties
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultset.java
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/resultset.out
ADD /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/util/BigDecimalHandler.java (from /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/BigDecimalHandler.java)
MODIFY /db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/resultset.out
MODIFY /db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/BinaryDecimal.java