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

Driver is throwing IllegalArgumentException instead of returning null

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.2.0
    • 1.2.2
    • Other
    • None
    • JDK 8
    • Sprint connector/j 1.3.0

    Description

      From* java.sql.Driver.connect* javadoc

      The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL

      The problem I ran into is that when the application is loaded with other other jdbc drivers (e.g. H2), mariadb driver is throwing an exception instead of returning null. This exception prevents DriveManager to continue checking other drivers for URL compatibility.

      Caused by: java.lang.IllegalArgumentException: Invalid connection URL url jdbc:h2:mem:RZM;DB_CLOSE_DELAY=-1
      at org.mariadb.jdbc.JDBCUrl.parse(JDBCUrl.java:144)
      at org.mariadb.jdbc.Driver.connect(Driver.java:95)
      at java.sql.DriverManager.getConnection(DriverManager.java:664)
      at java.sql.DriverManager.getConnection(DriverManager.java:208)

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            harel.e Harel E.
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.