Hi, I used Realms for the first time today with Tomcat 4.0.6. I noticed that, if you don't specify the "userCredCol" attribute correctly with the JDBCRealm (for example, accidentally calling it "userCredColumn"), you end up with a not-too-descriptive NullPointerException. (JDBCRealm line 389 in Tomcat 4.0.6.)
Tracking this down in the source, it appears that if you don't specify the userCredCol attribute, the following SQL query results: SELECT null FROM user_table WHERE username_column = ? This is a valid query and won't throw a SQLException. If the user exists, the query returns a row, but with "null" instead of the password. The call to "rs.getString(1).trim()" then throws the NullPointerException. It would be useful for JDBCRealm to instead throw an exception sooner if either of the critical parameters are not set properly. This would enable a more useful error message to be logged. -- Bill -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>