Bug 54458 - DataSourceRealm should provide more info on SQLException
DataSourceRealm should provide more info on SQLException
Product: Tomcat 7
Classification: Unclassified
Component: Catalina
PC Mac OS X 10.4
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2013-01-21 21:56 UTC by mkbucc
Modified: 2013-01-23 15:57 UTC (History)
0 users

Patch proposal (1.52 KB, patch)
2013-01-22 20:07 UTC, Violeta Georgieva
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mkbucc 2013-01-21 21:56:02 UTC
The getPassword() method of the DataSourceRealm does not log enough information when it encounters an SQL error.  The catch block is:

        } catch(SQLException e) {
        } finally {

it would be really helpful to have some details of what the SQLException is.  I am getting this intermittently, and have resorted to subclassing getPassword() in an attempt to figure out what is going wrong.
Comment 1 Violeta Georgieva 2013-01-22 20:07:54 UTC
Created attachment 29883 [details]
Patch proposal


Information for SQLException can be provided for methods:
- getPassword(Connection, String)
- getRoles(Connection, String)
Comment 2 Mark Thomas 2013-01-23 15:57:56 UTC
Thanks for the patch. It has been applied to trunk and 7.0.x and will be included in 7.0.36 onwards.