Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-452

Import/export fails for DECIMAL type in J2ME/Foundation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.1.0, 10.2.1.6
    • 10.1.2.1, 10.2.1.6
    • Tools
    • None
    • J2ME/CDC/Foundation using IBM's WCTME 5.7

    Description

      Derby import/export tool has to be modified to work in J2ME/Foundation.

      I tried running the testcase importExport.java and it fails with following exception:
      -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Test importExport starting
      testing non-existing data file
      Data file not found: extinout/Z.dat
      testing null data file
      Data file cannot be null.
      testing empty table
      testing empty table with Delimited format
      testing empty table import Field/Char Delimiters
      PASS: setup complete
      testing import/export with default options
      FAIL: exception thrown:
      ERROR 38000: The exception 'SQL Exception: An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'.' was thrown while evaluating an expression.
      ERROR 22005: An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'.
      Test importExport finished
      -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      The exception is thrown because Derby system procedure for export calls getObject() on a DECIMAL type. This is not supported in J2ME/Foundation. Derby Embedded JSR 169 Functional Spec asks to use alternate JDBC getXXX and setXXX methods (like getString and setString) for DECIMAL type. I think the Derby import/export utility can be modified to call getString and setString for DECIMAL type when using J2ME/Foundation.

      Attachments

        1. derby-452.diff
          3 kB
          Deepa
        2. derby-452.status
          0.4 kB
          Deepa
        3. derbyall_report_j2me.txt
          205 kB
          Deepa

        Activity

          People

            deepa Deepa
            deepa Deepa
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: