Yep. It definitely hoses up when the session times out. In fact, the
JDBC realm adaptor is blown for all valid user accounts in the RDBMS
server, not just the session that timed out. Here is a slightly
different but easily repeated exception. It may be within the MySQL
driver, but I somehow doubt it.

My 5.025 tomcat did not have this problem I believe. Only restarting
Tomcat corrects this, but only until the session times out.

Mar 6, 2005 5:48:25 PM org.apache.catalina.realm.JDBCRealm getPassword
WARNING: Exception retrieving password for "guest"
Mar 6, 2005 5:48:25 PM org.apache.catalina.connector.CoyoteAdapter
service
SEVERE: An exception or error occurred in the container during the
request processing
java.lang.NullPointerException
        at com.mysql.jdbc.PreparedStatement.setString
(PreparedStatement.java:1254)
        at org.apache.catalina.realm.JDBCRealm.credentials
(JDBCRealm.java:497)
        at org.apache.catalina.realm.JDBCRealm.getPassword
(JDBCRealm.java:525)
        at org.apache.catalina.realm.JDBCRealm.authenticate
(JDBCRealm.java:399)
        at org.apache.catalina.realm.JDBCRealm.authenticate
(JDBCRealm.java:347)
        at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate
(BasicAuthenticator.java:181)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:446)
        at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:825)
        at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:526)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)


On Sun, 2005-03-06 at 10:19 -0500, Darren Govoni wrote:
> Hi,
>   I was able to get my JDBC basic authentication realm working fine. I
> left my server running overnight (session would have timed out) and when
> I tried to access my resource this morning I was getting this. I'm still
> looking into it, but I can reproduce it and will post details soon.
> 
> This is a major show stopper for me. Any thoughts guys?
> 
> Thank you!!
> Darren
> 
> PS. Uses MD5 password hashing. Like I said, it works but at some point
> starts throwing this exception (I think after session expire).
> 
> ------------
> 
> Mar 6, 2005 10:04:33 AM org.apache.catalina.realm.JDBCRealm getPassword
> SEVERE: Exception retrieving password for "architect"
> java.sql.SQLException: Connection.close() has already been called.
> Invalid operation in this state.
>         at com.mysql.jdbc.Connection.getMutex(Connection.java:2086)
>         at com.mysql.jdbc.PreparedStatement.executeQuery
> PreparedStatement.java:1508)
>         at org.apache.catalina.realm.JDBCRealm.getPassword
> (JDBCRealm.java:526)
>         at org.apache.catalina.realm.JDBCRealm.authenticate
> (JDBCRealm.java:399)
>         at org.apache.catalina.realm.JDBCRealm.authenticate
> (JDBCRealm.java:347)
>         at
> org.apache.catalina.authenticator.BasicAuthenticator.authenticate
> (BasicAuthenticator.java:181)
>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke
> (AuthenticatorBase.java:446)
>         at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:126)
>         at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:105)
>         at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:107)
>         at org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:148)
>         at org.apache.coyote.http11.Http11Processor.process
> (Http11Processor.java:825)
>         at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
>         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
> (PoolTcpEndpoint.java:526)
>         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
> (LeaderFollowerWorkerThread.java:80)
>         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> (ThreadPool.java:684)
>         at java.lang.Thread.run(Thread.java:595)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to