Hi, 

I am using tomcat 3.2.1 and container managed authentication. I have got the
following exceptions:


.......
Context Manager : JDBC Realm : The database connection is null or was found
to beh closed. Trying to reopen it. 
Context Manager : JDBC Realm : There was an SQLException while in
authenticate : [username]

........

The exception happens when tomcat did not receive requests for a long time
(over a night). I am using Oracle database. I have seen the previous message
on the same issue for MySQL. However, the fix to the MySQL did not work in
my case after I put in the attribute autoReconnect="true" in the JDBC Realm
configuration in server.xml. Here is my config : 

        <RequestInterceptor
            className="org.apache.tomcat.request.JDBCRealm"
            debug="99"
            driverName="oracle.jdbc.driver.OracleDriver"
            connectionURL="jdbc:oracle:thin:@[server address]:ORCL"
            connectionName=[oracle user name]
            autoReconnect="true"                                // this does
not help.
            connectionPassword=[password]
            userTable="contact"
            userNameCol="user_id"
            userCredCol="password"
            userRoleTable="user_role"
            roleNameCol="role_name" />

You help is very appreciated. 

Yi-Xiong

Reply via email to