Unnecessary warning fills up the webapp logging file, this happens every time a db pool creates a new connection and no classname is given. >> Not loading a JDBC driver as driverClassName property is null. Using the same webapp for mysqljar and mariadbjar system may use a configuration without driverClassName field. Destination tomcat may provide both or one of jdbc jar files without a webapp developer knowledge. What is an empty driverClassName="" attribute was given then it's an explicit choice and Tomcat did not need to write a warning log? See source code: https://github.com/apache/tomcat/blob/ed8cc4f3beddbdc7d9634cc287660322804007fd/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java#L292 if (poolProperties.getDriverClassName()==null) { //rely on DriverManager log.warn("Not loading a JDBC driver as driverClassName property is null."); } else {... See contextxml db connection example: <!-- use mariajdbc if found then mysqljdbc --> <Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" initialSize="2" maxActive="300" maxIdle="10" maxWait="30000" username="myuser" password="mypwd" url="jdbc:mysql://127.0.0.1:3306/mydb?permitMysqlScheme&useUnicode=true&characterEncoding=utf8" validationQuery="SELECT 1" validationInterval="6000" validationQueryTimeout="10" rollbackOnReturn="true" removeAbandoned="true" removeAbandonedTimeout="14400" logAbandoned="false" testOnBorrow="true" maxAge="300000" timeBetweenEvictionRunsMillis="60000" defaultTransactionIsolation="READ_COMMITTED" />
Correcting product
Seems easy enough to (a) change this into a DEBUG log and (b) change the language to be more clear. It's not that the driver isn't being loaded... it's that the pool isn't *explicitly* triggering the loading of the driver class. If I saw that WARNING in the log, I would wonder how my application was able to connect to the database if the pool wasn't loading the driver...