You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ivan Cheung <iv...@pobox.com> on 2008/04/18 17:53:53 UTC
How to detect the database for JDBC Realm is down
Hi,
I am building a web app and have setup digest authentication
I am testing the app when I take the database that contains the username
password down
The tomcat log file show this
(http-8443-Processor25) org.apache.catalina.core.ContainerBase.[Catalina]:
Exception performing authentication {
java.sql.SQLException: No operations allowed after connection closed.
at com.mysql.jdbc.Connection.checkClosed(Connection.java:2647)
at com.mysql.jdbc.Connection.commit(Connection.java:1039)
at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:563)
at org.apache.catalina.realm.RealmBase.getDigest(RealmBase.java:1091)
I have setup the WEB-INF/web.xml to trap this exception to show a custom
error page
<error-page>
<exception-type>java.sql.SQLException</exception-type>
<location>/server_rdbms_error.html</location>
</error-page>
however tomcat is not showing the custom error page and it keep popping up
the login page over and over again.
I was wondering if someone can tell me what is the proper way to setup the
custom error page when the database is down and authentication fail.
Thanks,
Ivan
Re: How to detect the database for JDBC Realm is down
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ivan,
Please give someone a change to answer the question before you re-post.
24 hours is an absolute minimum.
- -chris
Ivan Cheung wrote:
| Hi,
|
| I am building a web app and have setup digest authentication
|
| I am testing the app when I take the database that contains the username
| password down
|
| The tomcat log file show this
|
| (http-8443-Processor25) org.apache.catalina.core.ContainerBase.[Catalina]:
| Exception performing authentication {
| java.sql.SQLException: No operations allowed after connection closed.
| at com.mysql.jdbc.Connection.checkClosed(Connection.java:2647)
| at com.mysql.jdbc.Connection.commit(Connection.java:1039)
| at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:563)
| at org.apache.catalina.realm.RealmBase.getDigest(RealmBase.java:1091)
|
| I have setup the WEB-INF/web.xml to trap this exception to show a custom
| error page
|
| <error-page>
| <exception-type>java.sql.SQLException</exception-type>
| <location>/server_rdbms_error.html</location>
| </error-page>
|
| however tomcat is not showing the custom error page and it keep popping up
| the login page over and over again.
|
| I was wondering if someone can tell me what is the proper way to setup the
| custom error page when the database is down and authentication fail.
|
| Thanks,
| Ivan
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkgIyQQACgkQ9CaO5/Lv0PB1gQCfeW4Kpl/TYgLJhtBTLFkxCQ5c
jMwAni8wNXo7g3XIgybNU1VXm3InpKhz
=8HJ4
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: How to detect the database for JDBC Realm is down
Posted by Mark Thomas <ma...@apache.org>.
Ivan Cheung wrote:
> reposting to see if I have better luck this time.
http://wiki.apache.org/tomcat/FAQ/Tomcat_User#Q2
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: How to detect the database for JDBC Realm is down
Posted by Ivan Cheung <iv...@pobox.com>.
reposting to see if I have better luck this time.
On Fri, Apr 18, 2008 at 8:53 AM, Ivan Cheung <iv...@pobox.com> wrote:
> Hi,
>
> I am building a web app and have setup digest authentication
>
> I am testing the app when I take the database that contains the username
> password down
>
> The tomcat log file show this
>
> (http-8443-Processor25) org.apache.catalina.core.ContainerBase.[Catalina]:
> Exception performing authentication {
> java.sql.SQLException: No operations allowed after connection closed.
> at com.mysql.jdbc.Connection.checkClosed(Connection.java:2647)
> at com.mysql.jdbc.Connection.commit(Connection.java:1039)
> at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:563)
> at org.apache.catalina.realm.RealmBase.getDigest(RealmBase.java:1091)
>
> I have setup the WEB-INF/web.xml to trap this exception to show a custom
> error page
>
> <error-page>
> <exception-type>java.sql.SQLException</exception-type>
> <location>/server_rdbms_error.html</location>
> </error-page>
>
> however tomcat is not showing the custom error page and it keep popping up
> the login page over and over again.
>
> I was wondering if someone can tell me what is the proper way to setup the
> custom error page when the database is down and authentication fail.
>
> Thanks,
> Ivan
>