Hi,
When I try to establish a connection with invalid details such as incorrect username, incorrect password, incorrect database name etc. Hibernate catches whatever the exception may be such as SQLException and logs it and does not pass on the exception. Specifically line 140 of SettingsFactory.java in Hibernate 3.6.7 shows this behaviour.
I've previously spent a lot of time googling to find a solution and found some discussions of configuring c3p0, however now that I've actually looked at the Hibernate code I can see why I had no chance of getting this to work.
My application requires users to enter their credentials and database connection details, as such it is necessary to provide detailed feedback but I can't see how to do this.
Can anyone make some suggestions on how I extract the reason for failure?
Thanks
Lionel
|