Thanks for the help. The error message is misleading. I have tried out the
two parameters and they worked great. I no longer get the error. Thank you.



pprun wrote:
> 
> Hi, 
> 
> I am using DataSourceRealm to authenticate user in my application on
> Tomcat 5.5.28. When I left server idle overnight and tried to login into
> the application the next day, DataSourceRealm would fail in retrieving
> password. The following error message was shown in the console:
> 
> SEVERE: Exception retrieving password for "test1"
> 9-Oct-2009 9:22:22 AM org.apache.catalina.realm.DataSourceRealm close
> SEVERE: Exception closing database connection
> java.sql.SQLException: Already closed.
>       at
> org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:84)
>       at
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)
>       at
> org.apache.catalina.realm.DataSourceRealm.close(DataSourceRealm.java:379)
>       at
> org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:301)
>       at
> org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:258)
>       at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417)
>       at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>       at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>       at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>       at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>       at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
>       at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>       at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>       at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>       at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>       at java.lang.Thread.run(Thread.java:595)
> 
> Do anyone know how to resolve this issue? Any help appreciated. Thanks
> 
> Below is my context configuration in server.xml: 
> 
> <Context docBase="Reprosource" path="/Reprosource" reloadable="true"
> source="org.eclipse.jst.j2ee.server:Reprosource">
> <Resource name="jdbc/rpsDB" 
>                auth="Container" 
>              type="javax.sql.DataSource"
>                maxActive="100" 
>                maxIdle="30" 
>                maxWait="10000"
>                removeAbandoned="true"
>                removeAbandonedTimeout="60"
>                logAbandoned="true"
>                      username="user1" 
>                password="web01" 
>                driverClassName="org.gjt.mm.mysql.Driver"
>                url="jdbc:mysql://localhost:3306/rpsmaster"/>
>                                  
> <Realm  className="org.apache.catalina.realm.DataSourceRealm" 
>          dataSourceName="jdbc/rpsDB"
>          userTable="users" 
>          userNameCol="user_name"  
>          userCredCol="user_pass" 
>          userRoleTable="user_roles"  
>          roleNameCol="role_name" 
>          digest="MD5" 
>          localDataSource="true"/>                  
> </Context>
> 
> -- Run
> 

-- 
View this message in context: 
http://www.nabble.com/DataSourceRealm-failed-to-retrieve-password-after-tomcat-server-being-idle-overnight-tp25822607p25834516.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to