This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 94b574e9ad Fix BZ 68436 - don't warn when driverClassName is not set
94b574e9ad is described below
commit 94b574e9ad871d867ff2bf72f08eb8136f4ec865
Author: Raphael <[email protected]>
AuthorDate: Wed Oct 14 10:51:47 2026 +0200
Fix BZ 68436 - don't warn when driverClassName is not set
https://bz.apache.org/bugzilla/show_bug.cgi?id=68436
---
.../java/org/apache/tomcat/jdbc/pool/PooledConnection.java | 10 ++++++----
webapps/docs/changelog.xml | 11 +++++++++++
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
index dfbbd121cc..b8bebf5edc 100644
---
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
+++
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/PooledConnection.java
@@ -309,13 +309,15 @@ public class PooledConnection implements
PooledConnectionMBean {
try {
if (driver==null) {
- if (log.isDebugEnabled()) {
- log.debug("Instantiating driver using class:
"+poolProperties.getDriverClassName()+" [url="+poolProperties.getUrl()+"]");
- }
if (poolProperties.getDriverClassName()==null) {
//rely on DriverManager
- log.warn("Not loading a JDBC driver as driverClassName
property is null.");
+ if (log.isDebugEnabled()) {
+ log.debug("No driverClassName is configured so the
driver will be located by DriverManager.");
+ }
} else {
+ if (log.isDebugEnabled()) {
+ log.debug("Instantiating driver using class:
"+poolProperties.getDriverClassName()+" [url="+poolProperties.getUrl()+"]");
+ }
driver = (java.sql.Driver)
ClassLoaderUtil.loadClass(
poolProperties.getDriverClassName(),
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f2f8950284..91f274600d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -441,6 +441,17 @@
</fix>
</changelog>
</subsection>
+ <subsection name="jdbc-pool">
+ <changelog>
+ <fix>
+ <bug>68436</bug>: Reduce the log level from warning to debug for the
+ message logged when <code>driverClassName</code> is not set, as relying
+ on <code>DriverManager</code> to locate the driver is a valid
+ configuration. Pull request <pr>1084</pr> provided by Raphael
Vullriede.
+ (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Other">
<changelog>
<update>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]