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

possible NPE on aurora when failover occur during connection initialisation

    XMLWordPrintable

Details

    Description

      (reported by user)

      The short version:
      I initiated 2 subsequent failovers upon creating a connection with multiple instance endpoints. The currentProtocol variable is null and therefore causes a NPE in the searchByStartName method (AuroraListener: line 194), which was called in the loop method of AuroraProtocol (AuroraProtocol: line 158). Adding a breakpoint on line 194 of AuroraListener helps tracing back. I would like to know why the currentProtocol is added to the blacklist.

      Here is the relevant stacktrace:
      java.lang.NullPointerException
      at org.mariadb.jdbc.internal.failover.impl.AuroraListener.searchByStartName(AuroraListener.java:194)
      at org.mariadb.jdbc.internal.protocol.AuroraProtocol.loop(AuroraProtocol.java:158)
      at org.mariadb.jdbc.internal.failover.impl.AuroraListener.reconnectFailedConnection(AuroraListener.java:147)
      at org.mariadb.jdbc.internal.failover.impl.MastersSlavesListener.initializeConnection(MastersSlavesListener.java:158)
      at org.mariadb.jdbc.internal.failover.FailoverProxy.<init>(FailoverProxy.java:93)
      at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:455)
      at org.mariadb.jdbc.Driver.connect(Driver.java:105)
      at java.sql.DriverManager.getConnection(DriverManager.java:664)
      at java.sql.DriverManager.getConnection(DriverManager.java:247)
      …

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            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.