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

jdk 1.6 client driver omits SQLStates and chained exceptions in error messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.2.1.6
    • 10.3.1.4
    • JDBC, Network Client, Tools
    • None
    • Sun JDK 1.6

    Description

      When running some SQL queries through ij that fails it seems like some
      information about chained exceptions is not presented to the user when
      running with the client driver and jdk 1.6.

      One example SQL that fails (taken from the ieptests.sql):
      =========================================================

      ij> call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('inventory', 'ORDERTABLE' ,
      'extinout/order.dat', null, null, null) ;

      When running this in ij the following error message is produced:

      Java 1.6 Embedded driver:
      =========================

      ERROR 38000: The exception 'java.sql.SQLSyntaxErrorException: Schema
      'inventory' does not exist' was thrown while evaluating an expression.
      ERROR 42Y07: Schema 'inventory' does not exist

      Java 1.5 Client driver:
      =======================

      ERROR 38000: The exception 'SQL Exception: Schema 'inventory' does not
      exist' was thrown while evaluating an expression. SQLSTATE: 42Y07:
      Schema 'inventory' does not exist

      Java 1.6 Client driver:
      =======================

      ERROR 38000: The exception 'java.sql.SQLSyntaxErrorException: Schema
      'inventory' does not exist' was thrown while evaluating an expression.

      The bug (or difference) here is that the client driver when running
      with jdk 1.6 does not print the chained exception and SQL state.
      It would be nice to have the same information in the output as what is
      written by the embedded driver (or client driver running with jdk
      1.5).

      Attachments

        1. 1440-followup.diff
          4 kB
          Knut Anders Hatlen
        2. 1440.stat
          1.0 kB
          Knut Anders Hatlen
        3. 1440.diff
          18 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              knutanders Knut Anders Hatlen
              olav Olav Sandstaa
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: