Details

Description

Test fails with the following diff (edited for readability):

testParameterMapping(jdbcapi.ParameterMappingTest)junit.framework.AssertionFailedError:
(22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'.
at ParameterMappingTest.showException(ParameterMappingTest.java:2827)
at ParameterMappingTest.judge_setXXX(ParameterMappingTest.java:1239)
at ParameterMappingTest.setXXX(ParameterMappingTest.java:1352)
at ParameterMappingTest.testParameterMapping(ParameterMappingTest.java:407)
at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:80)

Activity

Here is the nested exception with the underlying trace. When executing a batch setByte on a DECIMAL column fails because DataType.setInto() calls getObject during executeBatch, but it executes normally setByte is set and the statement is executed with executeUpdate. I will disable on J2ME until this issue is resolved.

.ERROR 22005: An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'.
at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:316)
at org.apache.derby.iapi.types.DataType.dataTypeConversion(DataType.java:1038)
at org.apache.derby.iapi.types.DataType.getObject(DataType.java:576)
at org.apache.derby.iapi.types.DataType.setInto(DataType.java:621)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeBatchElement(EmbedPreparedStatement.java:1007)
at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(EmbedStatement.java:924)
at org.apache.derbyTesting.functionTests.tests.jdbcapi.ParameterMappingTest.setXXX(ParameterMappingTest.java:134
2)
at org.apache.derbyTesting.functionTests.tests.jdbcapi.ParameterMappingTest.testParameterMapping(ParameterMappin
gTest.java:407)
at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
at java.lang.reflect.Method.invoke(Method.java:253)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:76)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.start(TestRunner.java:172)
at junit.textui.TestRunner.main(TestRunner.java:138)

Kathey Marsden
added a comment - 06/Mar/07 21:15 Here is the nested exception with the underlying trace. When executing a batch setByte on a DECIMAL column fails because DataType.setInto() calls getObject during executeBatch, but it executes normally setByte is set and the statement is executed with executeUpdate. I will disable on J2ME until this issue is resolved.
.ERROR 22005: An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'.
at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:316)
at org.apache.derby.iapi.types.DataType.dataTypeConversion(DataType.java:1038)
at org.apache.derby.iapi.types.DataType.getObject(DataType.java:576)
at org.apache.derby.iapi.types.DataType.setInto(DataType.java:621)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeBatchElement(EmbedPreparedStatement.java:1007)
at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(EmbedStatement.java:924)
at org.apache.derbyTesting.functionTests.tests.jdbcapi.ParameterMappingTest.setXXX(ParameterMappingTest.java:134
2)
at org.apache.derbyTesting.functionTests.tests.jdbcapi.ParameterMappingTest.testParameterMapping(ParameterMappin
gTest.java:407)
at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
at java.lang.reflect.Method.invoke(Method.java:253)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:76)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.start(TestRunner.java:172)
at junit.textui.TestRunner.main(TestRunner.java:138)

Attaching a patch to disable with weme6.1 until underlying bug gets fixed. I disabled the test by adding a conditional to _Suite, but am not sure that this is the correct way to do this. Perhaps a TestConfiguration is the correct way to go. I'd appreciate input.

Kathey Marsden
added a comment - 06/Mar/07 22:21 Attaching a patch to disable with weme6.1 until underlying bug gets fixed. I disabled the test by adding a conditional to _Suite, but am not sure that this is the correct way to do this. Perhaps a TestConfiguration is the correct way to go. I'd appreciate input.

I'm marking this fixed, because the test is not currently failing. Of course, that's because it's not running at all, but I think the reason for that is sufficiently covered by DERBY-2210, we don't need two issues open.

Myrna van Lunteren
added a comment - 21/Feb/11 19:23 I'm marking this fixed, because the test is not currently failing. Of course, that's because it's not running at all, but I think the reason for that is sufficiently covered by DERBY-2210 , we don't need two issues open.