Hello,
is there a possibility to catch nested exceptions? I want to give a user feedback in the view, if a connection to a database cannot be established.
I found the catch block at SettingsFactory.java, which doesn't forward the exception:
Code:
catch (SQLException sqle) {
log.warn("Could not obtain connection metadata", sqle);
}
If this isn't possible, is there a easy method call to check the database connection?
Refused connections to the database are logged in this way:
Code:
20:11:29,202 WARN SettingsFactory:103 - Could not obtain connection metadata
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused
STACKTRACE:
java.net.SocketException: java.net.ConnectException: Connection refused
Thank you
Timo Meinen
timomeinen@googlemail.com
Hibernate version:
3.1
Name and version of the database you are using:
MySQL 4.0.21