Throw an exception if the driver doesn't support the supplied URL
Based on a patch by Owen Jacobson
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@729809
13f79535-47bb-0310-9956-
ffa450edef68
if (connectionPassword != null)
props.put("password", connectionPassword);
dbConnection = driver.connect(connectionURL, props);
+ if (dbConnection == null) {
+ throw new SQLException(sm.getString(
+ "jdbcRealm.open.invalidurl",driverName, connectionURL));
+ }
dbConnection.setAutoCommit(false);
return (dbConnection);
jdbcRealm.getPassword.exception=Exception retrieving password for "{0}"
jdbcRealm.getRoles.exception=Exception retrieving roles for "{0}"
jdbcRealm.open=Exception opening database connection
+jdbcRealm.open.invalidurl=Driver "{0}" does not support the url "{1}"
jndiRealm.authenticateFailure=Username {0} NOT successfully authenticated
jndiRealm.authenticateSuccess=Username {0} successfully authenticated
jndiRealm.close=Exception closing directory server connection