Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-886

SQLState '08' is incorrectly mapped to SQLNonTransientConnectionException instead of SQLTransientConnectionException

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 2.7.3
    • N/A
    • Other
    • None

    Description

      The javadoc of java.sql.SQLTransientConnectionException[1] states:
      ```
      The subclass of SQLException for the SQLState class value '08', or under vendor-specified conditions.
      ```
      So SQLState with value '08' is expected to be mapped to SQLTransientConnectionException. However, the JDBC driver code[2], currently maps it to SQLNonTransientConnectionException instead:

      ```
      case "08":
      returnEx = new SQLNonTransientConnectionException(msg, sqlState, errorCode, cause);
      break;
      ```

      [1] https://docs.oracle.com/javase/8/docs/api/java/sql/SQLTransientConnectionException.html
      [2] https://github.com/mariadb-corporation/mariadb-connector-j/blob/master/src/main/java/org/mariadb/jdbc/util/exceptions/ExceptionFactory.java#L221

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            jaikiran Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.