commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Oxley <d...@daveoxley.co.uk>
Subject [DBCP] Bug with Poolable PreparedStatements and DriverAdapterCPDS
Date Mon, 20 Oct 2003 17:54:54 GMT
When setting up my pool like this:
            DriverAdapterCPDS cpds = new DriverAdapterCPDS();

            cpds.setDriver(jdbc_driver_name);
            cpds.setUrl(url);
            cpds.setUser(user);
            cpds.setPassword(pwd);
            cpds.setPoolPreparedStatements(true);

            SharedPoolDataSource tds = new SharedPoolDataSource();
            tds.setConnectionPoolDataSource(cpds);
            tds.setMaxActive(50);
            tds.setMaxWait(-1);
            tds.setMaxIdle(10);
            tds.setDefaultAutoCommit(false);

I get the following exception when calling prepareStatement(sql):

Caused by: java.lang.RuntimeException: java.lang.ClassCastException
    at 
org.apache.commons.dbcp.cpdsadapter.PooledConnectionImpl.makeObject(PooledConnectionImpl.java:324)
    at 
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:792)
    at 
org.apache.commons.dbcp.cpdsadapter.PooledConnectionImpl.prepareStatement(PooledConnectionImpl.java:243)
    at 
org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.prepareStatement(ConnectionImpl.java:332)

Dave.


---------------------------------------------------------------------
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