Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4 c3p0 or Spring problem?

closed
nobody
None
5
2014-12-18
2004-11-12
No

I am using the c3p0 ComboPooledDataSource as a Spring
configured DataSource for Beans.
With a unkown userid/passwd i get the following Error
Stack repeatingly until i kill the thread:
<snip>
[junit] Initializing c3p0 pool...
com.mchange.v2.c3p0.PoolBackedDataSource@dda25b [
connectionPoolDataSource ->
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@7808b9
[ acquireIncrement -> 3, autoCommitOnClose -> false,
connectionTesterClassName ->
com.mchange.v2.c3p0.impl.DefaultConnectionTester,
factoryClassLocation -> null,
forceIgnoreUnresolvedTransactions -> false,
idleConnectionTestPeriod -> -1, initialPoolSize -> 3,
maxIdleTime -> 0, maxPoolSize -> 15, maxStatements ->
0, minPoolSize -> 3, nestedDataSource ->
com.mchange.v2.c3p0.DriverManagerDataSource@ce2187 [
description -> null, driverClass ->
oracle.jdbc.OracleDriver, factoryClassLocation -> null,
jdbcUrl -> jdbc:oracle:thin:@sgap2.apgsga.ch:1521:dev1,
properties -> {user=xx , password=vs_pass} ] ,
propertyCycle -> 300, testConnectionOnCheckout -> false
] , factoryClassLocation -> null, numHelperThreads -> 3 ]
[junit] java.sql.SQLException: ORA-01017: invalid
username/password; logon denied
[junit] at
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
[junit] at
oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
[junit] at
oracle.jdbc.ttc7.O3log.receive1st(O3log.java:407)
[junit] at
oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:260)
[junit] at
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:360)
[junit] at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
[junit] at
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
[junit] at java.sql.DriverManager.getConnection(Unknown
Source)
[junit] at java.sql.DriverManager.getConnection(Unknown
Source)
[junit] at
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:66)
[junit] at
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:76)
[junit] at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.acquireResource(C3P0PooledConnectionPool.java:66)
[junit] at
com.mchange.v2.resourcepool.BasicResourcePool.assimilateResource(BasicResourcePool.java:787)
[junit] at
com.mchange.v2.resourcepool.BasicResourcePool.acquireUntil(BasicResourcePool.java:548)
[junit] at
com.mchange.v2.resourcepool.BasicResourcePool.access$000(BasicResourcePool.java:35)
[junit] at
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:972)
[junit] at
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:148)
<snip>
Is this a configuration problem? What am i missing?

Best thanx for any help
Christoph

Discussion

  • Logged In: YES
    user_id=790149

    Versions i am using:
    c3p0-0.8.4.5 and spring 1.1
    oracle 9i , with oracle thin jdbc driver: ojdbc14.jar

     
  • Steve Waldman
    Steve Waldman
    2004-12-01

    Logged In: YES
    user_id=175530

    Christoph,

    1) Sorry this is so late.... I didn't have this "tracker" set up to e-mail me
    on adds, and yours is the first (of now several) support requests placed
    here on sourceforge. (Usually I've handled support requests by e-mail, or
    on the list c3p0-users@lists.sourceforge.net. Anyway, I should get e-
    mails now from support submissions here.)

    2) Since your username and password are unknown, c3p0 fails to acquire
    Connections. c3p0 doesn't know exactly why it failed, so it follows its
    usual procedure for dealing with failed acquisitions. Under c3p0
    -0.8.4.5, that was hardcoded as retry 30 times, spaced one second apart.
    As of c3p0-0.8.5-preX, c3p0's behavior or Connection acquisition failure
    is configurable, although it defaults to similar behavior. (Perhaps c3p0
    should try to notice an SQL code for bad authentication and give up
    immediately, rather than retrying in that case. Something to think
    about.)

    Anyway, sorry again for the slow response!

    Steve

     
  • Steve Waldman
    Steve Waldman
    2005-02-07

    • status: open --> closed