tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Tomcat v5.0.18 and auth problems - NullPointerException
Date Thu, 19 Feb 2004 11:47:33 GMT
Hi all,

I have a web application that is password protected against a postgres 
database, defined like so:

<Realm className="org.apache.catalina.realm.DataSourceRealm" debug="0"
   dataSourceName="jdbc/GlobalPatricia"
   userTable="person" userNameCol="uid" userCredCol="user_password"
   userRoleTable="company_person" roleNameCol="serial"/>

For normal users logging in, this works fine.

If however, a user in the postgres database has their password field set 
to "null", and an attempt is made to log in as this user using any 
password, the exception below is thrown by tomcat.

Tomcat then returns a 200 OK to the browser, along with a blank page.

2004/02/19 01:42:10 org.apache.coyote.tomcat5.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the 
request processing
java.lang.NullPointerException
	at 
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:369)
	at 
org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:306)
	at 
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:182)
	at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
	at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
	at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
	at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
	at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
	at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:534)

Anyone have any clues on how to stop this?

Regards,
Graham
--


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message