You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeff Kilbride <je...@kilbride.com> on 2001/04/23 23:28:46 UTC

JDBC Realm problem

I'm using JDBC Realm with MySQL to protect an area of my website. I've got everything configured correctly and it works. However, I've noticed that if the protected area is accessed and then *not* accessed again for a period longer than my MySQL connection timeout value (default of 8 hours), JDBC Realm is unable to recover and all users are sent to my login error page.

Here's the entry from my tomcat.log:

----------------------------------
2001-04-23 12:51:27 - ContextManager: JDBCRealm: The database connection is null or was found to be closed. Trying to re-open it.
2001-04-23 12:51:27 - ContextManager: JDBCRealm: There was an SQLException while in authenticate: null
2001-04-23 12:51:27 - ContextManager: JDBCRealm: SQLException: java.sql.SQLException: Invalid authorization specification: Access denied for user: 'nobody@localhost' (Using password: NO)
----------------------------------

I suppose I could up the timeout value in MySQL, but isn't it a little strange that JDBC Realm can't open a new connection to recover?

Anyone else had this problem? I'm using Tomcat 3.2.1 on Linux with IBMJava2-13.

Thanks,
--jeff