tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52025] 7.0.21 and newer break the JDK 6 Service provider mechanism for loading JDBC Drivers
Date Thu, 13 Oct 2011 22:01:25 GMT

--- Comment #6 from Rick Bullotta <> 2011-10-13 22:01:25
UTC ---
(In reply to comment #5)
> I'll need to do some testing to see how well this actually worked before the
> change. I have my suspicions about possible failure modes I need to check.
> Depending on what the testing shows, this will / will not be treated as a
> regression but either way the docs will probably end up being updated.

I can reproduce fairly easily with the following scenario:

Drop a couple JDBC drivers (any will do, MySQL connector and jTDS are two that
we use) in the lib directly of a webapp.  When an attempt is made to get a JDBC
connection, in the loadInitialDrivers of the DriverManager class, it will (one
time) try to get a list of JDBC drivers using the Service Provider mechanism. 
7.0.20 and earlier would load and find three drivers (the two in the webapp and
one built into the JVM). 7.0.21 and later do not see the drivers in the webapp.
 It uses the getCallerClassLoader() method to pass a classloader into the
ServiceProvider stuff that is in sun.misc.Service. I'm guessing that the
classloader here is obviously behaving differently - just not sure the
mechanics, and it sound like you're very familiar with what's going on.

LMK if you want us to test/try anything else.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message