Uploaded image for project: 'Lucee Development'
  1. LDEV-1496

Updating MySQL driver to 6.0.2 breaks existing datasource connections

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.2.3.33
    • Fix Version/s: 5.2.7.9
    • Labels:
      None
    • Environment:

      Lucee 5.2.3.35
      Windows 10 (10.0) 64bit
      Apache 2.4
      Apache Tomcat/8.5.16
      Java 1.8.0_144 (Oracle Corporation) 64bit
      MySQL 5.7.12-log

    • Sprint:
      March 2018

      Description

      Updating the MySQL driver to 6.0.2 breaks existing datasource connections.

      cannot load class through its string name, because no definition for the class with the specified name [org.gjt.mm.mysql.Driver] could be found caused by (java.lang.ClassNotFoundException:org.gjt.mm.mysql.Driver;java.lang.ClassNotFoundException:org.gjt.mm.mysql.Driver not found by lucee.core [64];)

      The issue is that that class name of the driver has changed.

      Related: https://github.com/speedment/speedment/issues/190

      old class: org.gjt.mm.mysql.Driver
      new class: com.mysql.cj.jdbc.Driver

      Workaround: recreate the datasource. When you recreate the datasource it will use the new class.

      Alternative workaround: search and replace class="org.gjt.mm.mysql.Driver" -> class="com.mysql.cj.jdbc.Driver" in the <data-source> tags in lucee-server.xml. After doing this, all datasources verify and sites seem to work.

      I also additionally then got this error which appears to be coming from Hibernate ORM (possibly this should be a different ticket?):

      Lucee 5.2.3.35 Error (java.sql.SQLException)
      Message Column name pattern can not be NULL or empty.

      This was down to a change in default value of the "nullNamePatternMatchesAll" connection property changed between versions 5.1.38 and 6.0.2:

      https://bugs.mysql.com/bug.php?id=81105

      Workaround: Adding &nullNamePatternMatchesAll=true to the end of the custom= param in the <datasource> definition in lucee-server.xml fixes this.

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              ivanmc Ivan McAvinchey
            • Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: