Derby
  1. Derby
  2. DERBY-2858

Export exceptions swallow useful information

    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, 10.4.1.3
    • Component/s: Tools
    • Labels:
      None

      Description

      If you try to export a table to a nonexistent directory, you get a SQLException which tells you that an IOException occurred. The actual IOException tells you that the file or directory can't be found. That is useful information and ought to appear in the message text of the SQLException. E.g.:

      j> call SYSCS_UTIL.SYSCS_EXPORT_TABLE
      (
      'APP',
      'LOBTABLE',
      '/unknown/test-export-table.dat',
      null,
      null,
      null
      );
      ERROR XIE0I: An IOException occurred while writing data to the file.

      1. link2.diff
        4 kB
        Knut Anders Hatlen
      2. link.diff
        1 kB
        Knut Anders Hatlen

        Activity

        Hide
        Knut Anders Hatlen added a comment -

        Perhaps linking the exceptions is enough? The attached, untested patch prints this for the same call:

        ij> call SYSCS_UTIL.SYSCS_EXPORT_TABLE
        (
        'APP',
        'LOBTABLE',
        '/unknown/test-export-table.dat',
        null,
        null,
        null
        );
        ERROR XIE0I: An IOException occurred while writing data to the file.
        ERROR XJ001: Java exception: '/unknown/test-export-table.dat (No such file or directory): java.io.FileNotFoundException'.

        Show
        Knut Anders Hatlen added a comment - Perhaps linking the exceptions is enough? The attached, untested patch prints this for the same call: ij> call SYSCS_UTIL.SYSCS_EXPORT_TABLE ( 'APP', 'LOBTABLE', '/unknown/test-export-table.dat', null, null, null ); ERROR XIE0I: An IOException occurred while writing data to the file. ERROR XJ001: Java exception: '/unknown/test-export-table.dat (No such file or directory): java.io.FileNotFoundException'.
        Hide
        Knut Anders Hatlen added a comment -

        i18n/iepnegativetests_ES.sql failed with the link.diff patch since some of the test cases printed more detailed error messages. Attaching a new patch which updates the canons for the test (there is a j9_foundation canon which I have updated but not tested).

        Show
        Knut Anders Hatlen added a comment - i18n/iepnegativetests_ES.sql failed with the link.diff patch since some of the test cases printed more detailed error messages. Attaching a new patch which updates the canons for the test (there is a j9_foundation canon which I have updated but not tested).
        Hide
        Knut Anders Hatlen added a comment -

        Committed link2.diff to trunk with revision 550478.

        I have also started the regression tests on 10.3 and will merge the fix if the tests pass.

        Show
        Knut Anders Hatlen added a comment - Committed link2.diff to trunk with revision 550478. I have also started the regression tests on 10.3 and will merge the fix if the tests pass.
        Hide
        Knut Anders Hatlen added a comment -

        Committed to 10.3 with revision 550721.

        Show
        Knut Anders Hatlen added a comment - Committed to 10.3 with revision 550721.

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Rick Hillegas
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development