commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29963] New: - BasicDataSource does not work with getConnection(String, String)
Date Wed, 07 Jul 2004 23:10:21 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29963>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29963

BasicDataSource does not work with getConnection(String, String)

           Summary: BasicDataSource does not work with getConnection(String,
                    String)
           Product: Commons
           Version: 1.2 Final
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Dbcp
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: fiddlerpianist@yahoo.com


Using DBCP 1.2.1, I cannot get a BasicDataSource to work when credentials are 
not supplied.  My application learns the username and password at runtime and 
as a result has to use getConnection(String, String). The problem seems to 
occur in the createDataSource() method.

If a username and password are not supplied with the data source, they get 
logged as missing, which is fine, but in the absence of the username/password 
upon creation of the ConnectionPoolFactory, it bombs upon validation.  Since 
createDataSource() is called without arguments regardless of the getConnection()
method that is called, validateConnectionFactory(PoolableConnectionFactory)
will always fail if the username and password are not supplied with the 
original data source configuration.

My application runs outside of an application server. I am using Spring 1.0 and 
have tried HSQL and MySQL JDBC drivers. I can reproduce this error.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message