Better error message according to
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 28 Jun 2009 15:58:13 +0000 (15:58 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 28 Jun 2009 15:58:13 +0000 (15:58 +0000)
https://issues.apache.org/bugzilla/show_bug.cgi?id=47439

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@789116 13f79535-47bb-0310-9956-ffa450edef68

modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PooledConnection.java

index ddbd71f..7c13581 100644 (file)
@@ -163,6 +163,10 @@ public class PooledConnection {
                 throw ex;
             }
         }
+        if (connection==null) {
+            throw new SQLException("Driver:"+driver+" returned null for URL:"+driverURL);
+        }
+        
         //set up the default state, unless we expect the interceptor to do it
         if (poolProperties.getJdbcInterceptors()==null || poolProperties.getJdbcInterceptors().indexOf(ConnectionState.class.getName())<0) {
             if (poolProperties.getDefaultReadOnly()!=null) connection.setReadOnly(poolProperties.getDefaultReadOnly().booleanValue());