Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4920

DIH JdbcDataSource exception handling

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.3, 6.0
    • 4.4
    • None

    Description

      JdbcDataSource will incorrectly suppress exceptions when retrieving a connection from a JNDI context and fall back to trying to use DriverManager to obtain a connection. This makes it impossible to troubleshoot misconfigured JNDI DataSource.

      Additionally, when a SQLException is thrown while initializing a connection, such as in setAutoCommit(), the connection will not be closed. This can cause a resource leak.

      A patch will be attached with unit tests that addresses both issues.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            shalin Shalin Shekhar Mangar
            chris.eldredge Chris Eldredge
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment