Created attachment 25022 [details] Patch for this issue. In certain situations the DataSourceWrapper is not able to connect to the database even if a driver class name was explicitly set. The core of the problem is that the DriverManager uses the caller's classloader (in this case the classloader of DataSourceWrapper) to find a driver for the given url. In some cases the classloader of DataSourceWrapper might be totally different and separate from the context classloader that registered the driver with DriverManager. In these cases the DriverManager will not "see" the driver registered earlier because of the different classloaders and the DataSourceWrapper.getConnection() will fail with "unable to find suitable driver" type of error message. One easy work solution for this problem is to actually use the driver object that was registered in setDriverClassName() to connect to the database. And if the connection fails then fallback to using the DriverManager API.
Patch applied as r1006229. Thanks