Author: remy.maucherat(a)jboss.com
Date: 2008-12-29 06:42:48 -0500 (Mon, 29 Dec 2008)
New Revision: 887
Modified:
trunk/java/org/apache/catalina/realm/JDBCRealm.java
trunk/java/org/apache/catalina/realm/LocalStrings.properties
Log:
- Report URL error in JDBC realm.
Modified: trunk/java/org/apache/catalina/realm/JDBCRealm.java
===================================================================
--- trunk/java/org/apache/catalina/realm/JDBCRealm.java 2008-12-29 11:42:28 UTC (rev 886)
+++ trunk/java/org/apache/catalina/realm/JDBCRealm.java 2008-12-29 11:42:48 UTC (rev 887)
@@ -698,6 +698,9 @@
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);
Modified: trunk/java/org/apache/catalina/realm/LocalStrings.properties
===================================================================
--- trunk/java/org/apache/catalina/realm/LocalStrings.properties 2008-12-29 11:42:28 UTC
(rev 886)
+++ trunk/java/org/apache/catalina/realm/LocalStrings.properties 2008-12-29 11:42:48 UTC
(rev 887)
@@ -38,6 +38,7 @@
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
Show replies by date