Derby
  1. Derby
  2. DERBY-2403

ParameterMappingTest.testParameterMapping() fails on weme6.1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: 10.3.1.4
    • Component/s: Test
    • Labels:
      None
    • Environment:
      weme6.1
    • Bug behavior facts:
      Regression Test Failure

      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)

      Noticed this failure since roughly 03/01/2007.

      1. DERBY-2403.diff
        1 kB
        Kathey Marsden

        Issue Links

          Activity

          Hide
          Kathey Marsden added a comment -

          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)

          Show
          Kathey Marsden added a comment - 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)
          Hide
          Kathey Marsden added a comment -

          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.

          Show
          Kathey Marsden added a comment - 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.
          Hide
          Kathey Marsden added a comment -

          When DERBY-2210 is fixed getObject() will be valid on J2ME and the test should pass.

          Show
          Kathey Marsden added a comment - When DERBY-2210 is fixed getObject() will be valid on J2ME and the test should pass.
          Hide
          Myrna van Lunteren added a comment -

          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.

          Show
          Myrna van Lunteren added a comment - 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.
          Hide
          Myrna van Lunteren added a comment -

          I meant to say - the test is not running at all with j2ME.

          Show
          Myrna van Lunteren added a comment - I meant to say - the test is not running at all with j2ME.

            People

            • Assignee:
              Unassigned
              Reporter:
              A B
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development