To avoid it getting lost in mail folders, could you please submit a bug report for this?
http://nagoya.apache.org/bugzilla/ Thanks! Craig On Sat, 7 Dec 2002, Bill Schneider wrote: > Date: Sat, 07 Dec 2002 17:18:23 -0500 > From: Bill Schneider <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: NullPointerException from incorrect JDBCRealm setup > > 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]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
