Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4657169

java.sql.DriverManager.getConnection reports wrong exception

    XMLWordPrintable

Details

    • generic
    • solaris_8

    Description

      private getConnection(String url, java.util.Properties info, ClassLoader callerCL) does not report the right exception if multiple drivers are registered.

      If all drivers fail establishing connections, reason will be set to the last SQLException occurred. This might not be the relevant exception. For example in iAS6.5, the iPlanet native driver is always registered although it might not be needed. Also it always happens to be accessed last. So if other Oracle drivers are used and are relevant, failure of the oracle driver to establish a connection will not be reported as an exception. Failure of the iPlanet driver to process the URL will be reported instead. This is very misleading for the person trying to determine any configuration errors as the exception message is unrelated to Oracle.

      The exception reporting in this class needs to be revamped so either the relevant or all exception messages are thrown as part of the exception.

      Attachments

        Activity

          People

            jbrucesunw Jonathan Bruce (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: