Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-4347

ODBC: NPE when cache name is different from the one configured in DSN

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8
    • Component/s: odbc
    • Labels:
      None

      Description

      The following query was executed from PHP PDO side

      $dbs = $dbh->prepare('INSERT INTO Person (_key, firstName, lastName, resume, salary) 
              VALUES (?, ?, ?, ?, ?)');
      

      The cache name in Spring XML configuration was "Person" while the DSN was configured to use "PersonCache" as a default cache name.

      As a result, I was getting NPE shown in the attached screenshot. Only after I sorted out the root cause of the NPE referring to the source code I could finally fix the issue.

      Let's provide more meaningful explanation rather than throwing NPE saying something like "The cache named

      {cache_name}

      has not been found. Make sure that ODBC connection string or DSN is configured properly."

        Attachments

        1. exception.png
          93 kB
          Denis A. Magda

          Issue Links

            Activity

              People

              • Assignee:
                vozerov Vladimir Ozerov
                Reporter:
                dmagda Denis A. Magda
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: