commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DBCP-420) InstanceKeyDataSource discards native SQLException when given password does not match password used to create the connection
Date Fri, 23 May 2014 15:11:02 GMT

     [ https://issues.apache.org/jira/browse/DBCP-420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved DBCP-420.
-----------------------

       Resolution: Fixed
    Fix Version/s: 2.0.1

Thanks for the report; fixed:

URL: http://svn.apache.org/r1597113
Log:
DBCP-420 InstanceKeyDataSource discards native SQLException when given password does not match
password used to create the connection

Modified:
    commons/proper/dbcp/trunk/src/changes/changes.xml
    commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java


> InstanceKeyDataSource discards native SQLException when given password does not match
password used to create the connection
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DBCP-420
>                 URL: https://issues.apache.org/jira/browse/DBCP-420
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Bjorn Vidar Remme
>             Fix For: 2.0.1
>
>         Attachments: dbcp_420_patch.txt
>
>
> The throw in InstanceKeyDataSource at line 936 does not pass on the native SQL exception
from the connection test:
> {code}
> } catch (SQLException ex) {
>                 // Password has not changed, so refuse client, but return connection
to the pool
>                 closeDueToException(info);
>                 throw new SQLException("Given password did not match password used"
>                                        + " to create the PooledConnection.");
>             }
> {code}
> It would be great if this throw could include the cause exception:
> {code}
>                 throw new SQLException("Given password did not match password used"
>                                        + " to create the PooledConnection.", ex);
> {code} 
> as we have code that detects login related SQLExceptions and takes actions on them. 
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message