Skip to content

fix(db): ship modern MySQL Connector/J 8.4.0 + purge legacy 5.1.x (#5) - #39

Merged
vijaya-boddipudi merged 4 commits into
mainfrom
fix/issue-5-mysql-connector-java8
Aug 14, 2026
Merged

fix(db): ship modern MySQL Connector/J 8.4.0 + purge legacy 5.1.x (#5)#39
vijaya-boddipudi merged 4 commits into
mainfrom
fix/issue-5-mysql-connector-java8

Conversation

@vijaya-boddipudi

Copy link
Copy Markdown
Collaborator

Fixes #5

Summary

8.1.x / Java 8 LTS installs (especially DTS) ship a legacy MySQL JDBC client (com.mysql.jdbc.* / Connector/J 5.1.x) that only supports mysql_native_password. Against MySQL 8 with its default caching_sha2_password plugin, that fails Hikari pool init with:

Client does not support authentication protocol requested by server;
consider upgrading MySQL client

This PR ships a modern, Java 8-compatible connector and ensures legacy 5.1.x JARs cannot survive an upgrade.

Decisions

  • Ship mysql-connector-j 8.4.0 as the MySQL driver (Option B). Connector/J 8.4.0 is the last 8.x release line that runs on JDK 8 before the 9.x cutover to JDK 17. Existing MariaDB Connector/J bumped 3.5.7 → 3.5.10 (last 3.x with full Java 8 LTS support); it remains MariaDB-only (jdbc:mariadb://…).
  • Customer URL scheme unchanged. jdbc:mysql://… continues to work; only the driver class moves from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver.
  • Driver class back-compat preserved in PSExecDTSSqlStmt switch — legacy case still maps to mysql.

Changes

POM / dependency pinning

  • deliverytiersuite/delivery-tier-suite/pom.xml<mysql.connector.version>8.4.0</mysql.connector.version> + dependencyManagement entry; MariaDB bumped to 3.5.10.
  • deliverytiersuite/.../DTS-shared-dependencies/pom.xmlcom.mysql:mysql-connector-j declared (provided scope).
  • deliverytiersuite/.../delivery-tier-distribution/pom.xml — mysql-connector-j added in 3 dependency sections (top-level + shared + tomcat9-cargo).
  • deliverytiersuite/.../delivery-tier-distribution/src/main/tomcat9/conf/catalina.properties — adds mysql-connector-j-*.jar and mysql-connector-java-*.jar to tomcat.util.scan.StandardJarScanFilter.jarsToSkip.

Driver class swap

  • system/config/config.xml, system/bin/config/config.xml (PSXJdbcDriverConfig).
  • system/services/.../PSDatabasePubServer.java enum.
  • modules/utils/.../RxInstaller.properties (DB type → driver map).
  • modules/TableFactory/.../PSTDToolDialogResources.properties (PSTDTool driver dropdown).
  • modules/perc-ant/.../PSExecDTSSqlStmt.java (new case + legacy case).
  • modules/perc-ant/src/test/.../TestUpdateRxRepositoryProperties.java and rx-ds.xml.mysql.
  • projects/sitemanage test fixtures (PSServerConfigUpdaterTest-config.xml, rx-ds.xml).
  • deliverytiersuite/.../p13n-ds/src-sql/soln-p13n.mysql.xml + jdbc.mysql.properties.
  • Docs: p13n-ds/src-sql/readme.txt + readme.htm, delivery-tier-distribution/src/main/conf/perc/perc-datasources.properties.sample.

Bundled JAR / install path

  • system/Tools/mysql/mysql-connector-java-8.0.18.jar (legacy artifact name) renamed to system/Tools/mysql/mysql-connector-j-8.4.0.jar.
  • modules/perc-distribution-tree/src/main/resources/installDistributionFiles.xml — copies the renamed JAR to ${assembly-directory}/jetty/base/lib/jdbc/mysql-connector.jar.

Installer purge (key fix for upgrades)

  • deliverytiersuite/.../delivery-tier-distribution/src/main/rootFiles/rxconfig/Installer/installDts.xml:
    • New pre-restore step deletes mysql-connector-java-5*.jar, -6*.jar, -7*.jar from Deployment/Server/common/lib, /lib, /perc-lib with failonerror="false" (silent if no legacy JAR present).
    • Backup-restore wildcard tightened from mysql-connector*.jar to mysql-connector-j-*.jar so a legacy 5.x backup cannot silently re-introduce the broken driver.

Runtime classpath refs

  • system/installResources/install.sh, system/release/tomcat/TomcatWindowsFiles/bin/runTd.bat, system/release/tomcat/TomcatSolarisFiles/bin/runTd.sh — now point at mysql-connector-j-8.4.0.jar.

Acceptance criteria

  • Decision recorded: mysql-connector-j 8.4.0 (+ MariaDB 3.5.10 for MariaDB servers). Rationale: Java 8 compatibility, drop-in for existing jdbc:mysql:// URLs, no DriverManager ambiguity (MariaDB uses jdbc:mariadb://).
  • Connector shipped in DTS distribution (delivery-tier-distribution dependencies + bundled JAR + install Dts).
  • Upgrade removes all known obsolete MySQL Connector/J 5.1.x (and conflicting older jars) from managed JDBC classpath locations.
  • Operator can revert from mysql_native_password to caching_sha2_password after upgrade (modern driver supports it).
  • No dual registration of com.mysql.jdbc + com.mysql.cj in a default install (legacy connector is purged).
  • CHANGELOG entry under 8.1.8 / GH_POST_PR_COMMIT_RUN_ID placeholder per AGENTS.md.

Verification

mvn install -pl modules/perc-ant,modules/utils,modules/TableFactory,
  deliverytiersuite/delivery-tier-suite/DTS-shared-dependencies,
  deliverytiersuite/delivery-tier-suite/delivery-tier-distribution -am -DskipTests

→ BUILD SUCCESS for all 25 modules including the modified ones (12 min total).

Pre-existing on main (unrelated, not introduced by this PR):

  • modules/perc-distribution-tree/.../Main.java:283 cannot find symbol entryDest (zip-slip Task 5 in commit efd14b2364) — pre-existing compile error in an unmodified line of code.
  • TestPSHtmlCleanerProperties.testFragment3 (rxutils) — pre-existing HTML attribute-ordering assertion. Verified failure exists on plain main.

Related

… MySQL 8 servers default to caching_sha2_password authentication. Legacy Connector/J 5.1.x (com.mysql.jdbc.Driver) only supports mysql_native_password and breaks Hikari pool init against MySQL 8 with: Client does not support authentication protocol requested by server; consider upgrading MySQL client Upgrade fixes: - Pin com.mysql:mysql-connector-j:8.4.0 (last Java 8-compatible Connector/J release line before the 9.x cutover to JDK 17) in delivery-tier-suite dependencyManagement + DTS-shared-dependencies + delivery-tier-distribution (3 sections: top-level, shared, tomcat9-cargo) and add it to tomcat9 catalina.properties jarsToSkip. - Update MySQL driver class to com.mysql.cj.jdbc.Driver across the product: system/config/config.xml, system/bin/config/config.xml (PSXJdbcDriverConfig), PSDatabasePubServer enum, RxInstaller.properties DB type map, PSTDToolDialogResources driver dropdown, PSExecDTSSqlStmt switch (added new case + kept legacy for back-compat), TestUpdateRxRepositoryProperties + rx-ds.xml.mysql mock fixture, sitemanage test fixtures, p13n-ds SQL/XML config + readme. - Bundle mysql-connector-j-8.4.0.jar in system/Tools/mysql/ (replaces the legacy-artifact-name mysql-connector-java-8.0.18.jar). Update installDistributionFiles.xml to copy the new file into jetty/base/lib/jdbc/mysql-connector.jar. - DTS installer (installDts.xml) now DELETES legacy mysql-connector-java-5*.jar, -6*.jar, -7*.jar from Deployment/Server/common/lib, /lib, /perc-lib with failonerror=false BEFORE the operator-backup restore step, so customers cannot silently keep a broken driver after upgrade. The backup-restore wildcard is tightened to mysql-connector-j-*.jar so a legacy 5.x backup cannot re-introduce the broken client. - Bump MariaDB Connector/J 3.5.7 -> 3.5.10 (last 3.x line with full Java 8 LTS support). - Runtime install classpath refs (system/installResources/install.sh, runTd.bat, runTd.sh) now point at mysql-connector-j-8.4.0.jar. Notes: - Connector/J 9.x dropped Java 8; 8.4.0 is the last 8.x release line that runs on JDK 8. - MariaDB Connector/J 3.5.x does not accept jdbc:mysql:// URLs by default; MySQL customers continue to use jdbc:mysql:// with com.mysql.cj.jdbc.Driver. - Customers who previously ALTERed their users to mysql_native_password can optionally revert to caching_sha2_password now that a modern driver ships. - Pre-existing compile error in modules/perc-distribution-tree/.../Main.java:283 (cannot find symbol entryDest, introduced by zip-slip Task 5 in commit efd14b2) is unrelated and left for a separate fix on main.  Verification:   mvn install -pl modules/perc-ant,modules/utils,modules/TableFactory,     deliverytiersuite/.../DTS-shared-dependencies,     deliverytiersuite/.../delivery-tier-distribution -am -DskipTests   -> BUILD SUCCESS for all modules including the modified ones.

@natechadwick-intsof natechadwick-intsof left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

The DTS Maven pin to com.mysql:mysql-connector-j:8.4.0, the com.mysql.cj.jdbc.Driver class-name sweep, and the PSExecDTSSqlStmt back-compat case are the right direction for MySQL 8 caching_sha2_password on Java 8. The PR does not actually ship Connector/J 8.4.0 in system/Tools/mysql/ — git records a 100% similarity LFS rename of the existing 8.0.18 blob — and the installer restore wildcard was tightened past the product's official mysql-connector.jar contract used by InstallUtil / PSJdbcUtils. DTS runtime via Tomcat common/lib/*.jar can still pick up the Maven artifact; CMS dev installs and installer-driven MySQL connections will not get what the changelog claims.

Issue counts by severity

  • bugs: 2
  • suggestions: 3
  • nits: 0

Issues outside the diff

These findings reference lines that are not present in the diff and could not be posted as inline comments:

  • [bug] system/Tools/mysql/mysql-connector-j-8.4.0.jar:1 — The bundled driver is not Connector/J 8.4.0. The diff is a rename-only (similarity index 100%) of system/Tools/mysql/mysql-connector-java-8.0.18.jar. *.jar is LFS-tracked, so the pointer/OID is unchanged and the bytes are still 8.0.18. modules/perc-distribution-tree/src/main/resources/installDistributionFiles.xml:552 then copies that mislabeled file to ${assembly-directory}/jetty/base/lib/jdbc/mysql-connector.jar for development installs. 8.0.18 does speak com.mysql.cj.jdbc.Driver / caching_sha2_password, but it is not 8.4.0 (last Java 8 8.x line) and it still carries post-8.0.18 Connector/J CVEs (e.g. the 8.0.33 / 8.2.0 fixes). DTS is the only path that actually resolves Maven 8.4.0.
    • Suggestion: Replace the LFS object with the real Central mysql-connector-j-8.4.0.jar (verify Implementation-Version and SHA-256 against repo1.maven.org) or stop committing a vendor JAR here and resolve the same Maven coordinate the DTS poms now use. Do not advertise 8.4.0 until the blob matches.

Comment thread system/installResources/install.sh Outdated
Comment thread CHANGELOG.md Outdated
@vijaya-boddipudi vijaya-boddipudi self-assigned this Aug 13, 2026
vijaya-boddipudi pushed a commit that referenced this pull request Aug 13, 2026
…cript/CHANGELOG fixes)

Review feedback on PR #39 (natechadwick-intsof), 4 threads:

1) [bug] installDts.xml narrowed the backup-restore include from
   mysql-connector*.jar to mysql-connector-j-*.jar, but the product
   contract path is mysql-connector.jar (PSJdbcUtils.MYSQL_DRIVER_LOCATION /
   MYSQL_DTS_DRIVER_LOCATION, InstallUtil.createLoadedConnection,
   installRepository.xml, install.xml). After the upgrade wipe the
   customer's working common/lib/mysql-connector.jar is gone and
   never restored -- the new Maven artifact lands only as
   mysql-connector-j-8.4.0.jar, breaking InstallUtil URLClassLoader
   loads.

   Fix:
   - Add mysql-connector.jar to the purge <fileset> in installDts.xml
     so the legacy generic-name contract file is wiped before the
     rewrite.
   - After the purge + backup-restore step, add a new <copy> that
     takes the shipped mysql-connector-j-*.jar from
     ${install.src}/Deployment/Server/common/lib and rewrites it to
     the historical contract path mysql-connector.jar via an Ant
     <mapper type="glob">. failonerror=false so first-time installs
     without a vendored mysql-connector-j-*.jar don't break.

2) [suggestion] install.sh, runTd.bat, runTd.sh referenced
   mysql-connector-j-8.4.0.jar under jdbc/mysql/ and
   ../server/rx/lib/ -- those are not the filenames the installer
   writes and runTd still points at the old Tomcat/JBoss layout.

   Fix: repoint all three scripts at the actual contract path
   mysql-connector.jar. install.sh uses
   $pwd/jdbc/mysql/mysql-connector.jar (the file installRepository.xml
   writes). runTd.bat / runTd.sh use
   ../../Deployment/Server/common/lib/mysql-connector.jar (the new
   DTS layout that PSJdbcUtils.MYSQL_DTS_DRIVER_LOCATION resolves to).

3) [suggestion] CHANGELOG (and PR body) listed a driver-class update
   in system/bin/config/config.xml, but that path does not exist in
   the diff (system/bin/ is untracked / native DLLs -- my original PR
   did not modify it). Drop the bogus bullet.

4) [suggestion] installDts.xml purge comment restated the issue
   number, auth-plugin history, and made an inaccurate claim about
   "the modern driver is restored below from the backup" (restore
   only copies mysql-connector-j-*.jar if the backup already has one;
   first-time 5.1.x upgrades get the driver from install.src).

   Fix: replace the multi-line comment with a one-liner:
   <!-- Purge Connector/J 5-7 before backup restore. -->

Verification:
  mvn install -pl modules/perc-ant,modules/utils,modules/TableFactory,
    deliverytiersuite/.../DTS-shared-dependencies,
    deliverytiersuite/.../delivery-tier-distribution -am -DskipTests
  -> BUILD SUCCESS (25 modules, ~11 min).
…e LFS rename of mysql-connector-java-8.0.18.jar (oid 562cff6a) with the Maven Central mysql-connector-j-8.4.0.jar so CMS/dev installs match the DTS Maven pin and the changelog. > Co-Authored by Grok 4.6 using grok-4.6 with agent Grok 4.6.
@natechadwick-intsof

Copy link
Copy Markdown
Collaborator

Shipped the real Maven Central Connector/J 8.4.0 in e8e26f63832d815b47db7f0985fcf73a2be66e25.

This closes the remaining review-level [bug] (the LFS JAR could not take an inline thread): system/Tools/mysql/mysql-connector-j-8.4.0.jar is no longer a rename of mysql-connector-java-8.0.18.jar.

Check Value
Artifact https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/8.4.0/mysql-connector-j-8.4.0.jar
Size 2533399
SHA-1 b1bc0f47bcad26ad5f9bceefb63fcb920d868fca (matches Central .sha1)
SHA-256 d77962877d010777cff997015da90ee689f0f4bb76848340e1488f2b83332af5 (computed locally; Central .sha256 404s)
Implementation-Version 8.4.0 (Bundle-Version: 8.4.0)
LFS oid changed from 562cff6acda7f6a537b430795e32ab28e439936446d5443f64cdcf6a0742e686 (size 2330539, the 8.0.18 blob) → d77962877d010777cff997015da90ee689f0f4bb76848340e1488f2b83332af5 (size 2533399)
Tracking still filter: lfs — the 2.5 MB blob is not in raw git

modules/perc-distribution-tree/.../installDistributionFiles.xml continues to copy this file to ${assembly-directory}/jetty/base/lib/jdbc/mysql-connector.jar, so CMS/dev installs now match the DTS Maven 8.4.0 pin.

CHANGELOG Issue #5 (## [8.1.8 Build GH_POST_PR_COMMIT_RUN_ID] - 2026-08-13) was updated in the same commit: the bundled-JAR bullet now records the Central hashes, and the stale install.sh / runTd.* bullet now points at the mysql-connector.jar contract path (fixed in db0958f).

The four inline review threads were already addressed in db0958f (installer restore of the mysql-connector.jar contract, classpath scripts, changelog path typo, comment trim). This commit is only the remaining review-level JAR bug.

…cript/CHANGELOG fixes) Review feedback on PR #39 (natechadwick-intsof), 4 threads:  1) [bug] installDts.xml narrowed the backup-restore include from    mysql-connector*.jar to mysql-connector-j-*.jar, but the product    contract path is mysql-connector.jar (PSJdbcUtils.MYSQL_DRIVER_LOCATION /    MYSQL_DTS_DRIVER_LOCATION, InstallUtil.createLoadedConnection,    installRepository.xml, install.xml). After the upgrade wipe the    customer's working common/lib/mysql-connector.jar is gone and    never restored -- the new Maven artifact lands only as    mysql-connector-j-8.4.0.jar, breaking InstallUtil URLClassLoader    loads.     Fix:    - Add mysql-connector.jar to the purge <fileset> in installDts.xml      so the legacy generic-name contract file is wiped before the      rewrite.    - After the purge + backup-restore step, add a new <copy> that      takes the shipped mysql-connector-j-*.jar from      ${install.src}/Deployment/Server/common/lib and rewrites it to      the historical contract path mysql-connector.jar via an Ant      <mapper type="glob">. failonerror=false so first-time installs      without a vendored mysql-connector-j-*.jar don't break.  2) [suggestion] install.sh, runTd.bat, runTd.sh referenced    mysql-connector-j-8.4.0.jar under jdbc/mysql/ and    ../server/rx/lib/ -- those are not the filenames the installer    writes and runTd still points at the old Tomcat/JBoss layout.     Fix: repoint all three scripts at the actual contract path    mysql-connector.jar. install.sh uses    $pwd/jdbc/mysql/mysql-connector.jar (the file installRepository.xml    writes). runTd.bat / runTd.sh use    ../../Deployment/Server/common/lib/mysql-connector.jar (the new    DTS layout that PSJdbcUtils.MYSQL_DTS_DRIVER_LOCATION resolves to).  3) [suggestion] CHANGELOG (and PR body) listed a driver-class update    in system/bin/config/config.xml, but that path does not exist in    the diff (system/bin/ is untracked / native DLLs -- my original PR    did not modify it). Drop the bogus bullet.  4) [suggestion] installDts.xml purge comment restated the issue    number, auth-plugin history, and made an inaccurate claim about    "the modern driver is restored below from the backup" (restore    only copies mysql-connector-j-*.jar if the backup already has one;    first-time 5.1.x upgrades get the driver from install.src).     Fix: replace the multi-line comment with a one-liner:    <!-- Purge Connector/J 5-7 before backup restore. -->  Verification:   mvn install -pl modules/perc-ant,modules/utils,modules/TableFactory,     deliverytiersuite/.../DTS-shared-dependencies,     deliverytiersuite/.../delivery-tier-distribution -am -DskipTests   -> BUILD SUCCESS (25 modules, ~11 min).
…-by: Vijay B <216913149+vijaya-boddipudi@users.noreply.github.com>
@vijaya-boddipudi
vijaya-boddipudi force-pushed the fix/issue-5-mysql-connector-java8 branch from 10fd227 to a563edc Compare August 14, 2026 13:45
@vijaya-boddipudi
vijaya-boddipudi merged commit e821e59 into main Aug 14, 2026
3 checks passed
@vijaya-boddipudi
vijaya-boddipudi deleted the fix/issue-5-mysql-connector-java8 branch August 14, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ship modern MySQL/MariaDB JDBC for Java 8; purge old mysql-connector 5.1.x on upgrade (MySQL 8 auth)

2 participants