tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wentzel <Michael.Went...@aswethink.com>
Subject RE: JDBC Realm Questions Tomcat 3.2.2
Date Fri, 06 Jul 2001 11:28:15 GMT
> Now, when somebody wants to access myServlet resource, he/she 
> must have the role
> of an Administrator or Operator. I think this should be 
> checked into the
> database.  The problem is that, when I've tried to access 
> myServlet for the
> first time, the following message was generated in the tomcat console:
> 
> 2001-07-05 04:11:49 - ContextManager: JDBCRealm: 
> JDBCRealm.authenticate: SELECT
> PASSWORD FROM MYUSERTABLE WHERE NAME = ?
> 2001-07-05 04:11:50 - ContextManager: JDBCRealm: 
> Authentication unsuccessful for
> user null
> 
> In the same time, the login window has appeard on Netscape 
> browser, but after
> I'd entered a valid user name and password (from myUserTable) 
> the message was
> the same:
> 
> 2001-07-05 04:14:19 - ContextManager: JDBCRealm: 
> Authentication unsuccessful for
> user null
> 
> It seems for me that the user name is null every time, no 
> matter if I enter a
> valid (user, passwd) or not. Is that a Tomcat bug, or I've 
> missed something....?

Check your database schema and make sure it is correct.  If it is
all I can suggest is add some debugging code to JDBCRealm, recompile
and throw it in TOMCAT_HOME/classes/, then restart and see what
the actual value of username is when authenticate(String, String) 
is called.


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com

Mime
View raw message