Summary
8.1.x / Java 8 LTS installs (especially DTS) still end up with a legacy MySQL JDBC client on the classpath (com.mysql.jdbc.* / Connector/J 5.1.x). Against MySQL 8+, that fails pool startup with:
com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool:
Client does not support authentication protocol requested by server; consider upgrading MySQL client
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Client does not support authentication protocol requested by server; consider upgrading MySQL client
MySQL 8 default user plugin is often caching_sha2_password. Old Connector/J 5.1 only supports mysql_native_password.
Field impact
- DTS services that need JDBC (metadata, feeds, comments, forms, membership, etc.) fail to create Spring
HikariDataSource beans → webapps broken or partial.
- Cascading CMS symptoms during publish (e.g. admin calls to DTS fail, metadata path errors) while Tomcat itself is “up.”
- Support workaround today:
ALTER USER … IDENTIFIED WITH mysql_native_password — works but should not be the only story for MySQL 8 customers.
- Upgrades that leave old
mysql-connector-java-5.1*.jar (or mixed 5.1 + 8.x) on Deployment/Server/lib / lib/jdbc (or CMS jetty/base/lib/jdbc) keep reproducing this forever.
Goals
- Ship a modern connector that works with MySQL 8 auth (
caching_sha2_password) on the Java 8 line for CMS and DTS packaging.
- Upgrade / install must remove obsolete MySQL connectors from known JDBC classpath locations so customers cannot silently keep 5.1.x.
- Decide product default: ship only MariaDB Connector/J if it fully supports our MySQL use (URL + auth + SSL + installer), or ship mysql-connector-j 8.x (and optionally MariaDB for MariaDB servers), but never leave 5.1.x beside a modern JAR.
Decision needed: MariaDB-only vs dual ship
Option A — Ship only MariaDB Connector/J (preferred if proven)
Pros:
- One JAR for MySQL-compatible and MariaDB servers.
- Already referenced heavily in delivery-tier distribution on main (
mariadb-java-client).
- Active maintenance, good MySQL 8 auth support on current 3.x drivers.
Cons / research required:
- MariaDB Connector/J 3.5+ behavior with
jdbc:mysql://… URLs (main-line notes: may not accept jdbc:mysql:// by default — see historical #1388 discussion on CMS).
- Installer /
perc-datasources / docs historically document jdbc:mysql:// for MySQL customers.
- Need a clear rule:
- either rewrite / document
jdbc:mariadb:// for all MySQL/MariaDB, or
- enable MariaDB driver acceptance of MySQL scheme if supported and safe.
- Verify: Hikari + our DTS datasources, SSL flags, timezone,
allowPublicKeyRetrieval, batch, and service-specific schemas.
Acceptance for A: one integration matrix pass — DTS + CMS against MySQL 8.0/8.4 with product-default URL form and caching_sha2 users (no mysql_native_password workaround).
Option B — Ship mysql-connector-j 8.x (and keep MariaDB for MariaDB if needed)
Pros:
- Drop-in for existing
jdbc:mysql:// configs.
- Aligns with main CMS dependency direction (
com.mysql:mysql-connector-j:8.4.x on current main).
Cons:
- Two MySQL-family JARs if MariaDB also ships → must still purge 5.1.x and avoid DriverManager ambiguity.
- Java 8 compatibility: pick a connector version that still supports Java 8 if this repo’s runtime is Java 8 (Connector/J 8.0.x/8.4 support matrix must be checked for JDK 8 vs 11+).
Acceptance for B: same MySQL 8 auth matrix; no 5.1.x remaining after upgrade.
Recommendation to validate in this issue
- Spike MariaDB Connector/J (version pinned for Java 8) with current 8.1.x DTS datasource URLs.
- If
jdbc:mysql:// works cleanly (or a one-line installer rewrite to jdbc:mariadb:// is acceptable), prefer MariaDB-only for MySQL-family on Java 8 LTS to reduce dual-driver mess.
- If not, ship mysql-connector-j (Java 8–compatible line) as the MySQL driver and MariaDB client only when targeting MariaDB, still delete all
mysql-connector-java-5*.jar / old com.mysql.jdbc artifacts on upgrade.
Upgrade must remove old connectors
Installer / update scripts for CMS and DTS should treat known JDBC dirs as managed:
| Product |
Typical locations (adjust to actual 8.1.x layout) |
| DTS |
Deployment/Server/lib/, Deployment/Server/lib/jdbc/, any Catalina shared lib used for webapps |
| CMS |
jetty/base/lib/jdbc/, distribution tree JDBC drop dir |
On install and upgrade:
This is as important as shipping the new JAR — field upgrades otherwise keep the broken client forever.
Packaging / docs
- Pin exact version in Java 8 BOM / delivery-tier / distribution POM.
- Document supported URL forms and MySQL 8 auth (no requirement for
mysql_native_password when modern driver is present).
- Upgrade notes: “MySQL 8: remove old connectors; if you previously altered users to native password, optional to move back to caching_sha2 after driver upgrade.”
- Cross-check CMS install path (same class of bug as closed main #1388 for 8.2) so Java 8 LTS is not left behind.
Acceptance criteria
Workaround (until fixed)
ALTER USER 'dts_user'@'%' IDENTIFIED WITH mysql_native_password BY '…';
FLUSH PRIVILEGES;
Then restart DTS. Prefer product fix over permanent native-password policy.
Related
Summary
8.1.x / Java 8 LTS installs (especially DTS) still end up with a legacy MySQL JDBC client on the classpath (
com.mysql.jdbc.*/ Connector/J 5.1.x). Against MySQL 8+, that fails pool startup with:MySQL 8 default user plugin is often
caching_sha2_password. Old Connector/J 5.1 only supportsmysql_native_password.Field impact
HikariDataSourcebeans → webapps broken or partial.ALTER USER … IDENTIFIED WITH mysql_native_password— works but should not be the only story for MySQL 8 customers.mysql-connector-java-5.1*.jar(or mixed 5.1 + 8.x) onDeployment/Server/lib/lib/jdbc(or CMSjetty/base/lib/jdbc) keep reproducing this forever.Goals
caching_sha2_password) on the Java 8 line for CMS and DTS packaging.Decision needed: MariaDB-only vs dual ship
Option A — Ship only MariaDB Connector/J (preferred if proven)
Pros:
mariadb-java-client).Cons / research required:
jdbc:mysql://…URLs (main-line notes: may not acceptjdbc:mysql://by default — see historical #1388 discussion on CMS).perc-datasources/ docs historically documentjdbc:mysql://for MySQL customers.jdbc:mariadb://for all MySQL/MariaDB, orallowPublicKeyRetrieval, batch, and service-specific schemas.Acceptance for A: one integration matrix pass — DTS + CMS against MySQL 8.0/8.4 with product-default URL form and
caching_sha2users (nomysql_native_passwordworkaround).Option B — Ship mysql-connector-j 8.x (and keep MariaDB for MariaDB if needed)
Pros:
jdbc:mysql://configs.com.mysql:mysql-connector-j:8.4.xon current main).Cons:
Acceptance for B: same MySQL 8 auth matrix; no 5.1.x remaining after upgrade.
Recommendation to validate in this issue
jdbc:mysql://works cleanly (or a one-line installer rewrite tojdbc:mariadb://is acceptable), prefer MariaDB-only for MySQL-family on Java 8 LTS to reduce dual-driver mess.mysql-connector-java-5*.jar/ oldcom.mysql.jdbcartifacts on upgrade.Upgrade must remove old connectors
Installer / update scripts for CMS and DTS should treat known JDBC dirs as managed:
Deployment/Server/lib/,Deployment/Server/lib/jdbc/, anyCatalinashared lib used for webappsjetty/base/lib/jdbc/, distribution tree JDBC drop dirOn install and upgrade:
mysql-connector-java-5*.jar, legacymysql-connector-java-*.jarusingcom.mysql.jdbcpackage, duplicate outdatedmysql-connector-j-*.jarif replacing with a newer pin.mysql-*.jarremains that isn’t the shipped pin (optional strict mode).This is as important as shipping the new JAR — field upgrades otherwise keep the broken client forever.
Packaging / docs
mysql_native_passwordwhen modern driver is present).Acceptance criteria
caching_sha2_passworduser — no Hikariauthentication protocolerror.com.mysql.jdbc+com.mysql.cj/ conflicting drivers in a default install.Workaround (until fixed)
Then restart DTS. Prefer product fix over permanent native-password policy.
Related