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 24136] New: - ClassCastException in DriverAdapterCPDS when setPoolPreparedStatements(true)
Date Sun, 26 Oct 2003 15:34:12 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24136>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24136

ClassCastException in DriverAdapterCPDS when setPoolPreparedStatements(true)

           Summary: ClassCastException in DriverAdapterCPDS when
                    setPoolPreparedStatements(true)
           Product: Commons
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Dbcp
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: dirk.verbeeck@pandora.be


Reported on commons-dev by Dave Oxley <dave AT daveoxley.co.uk> (20/10/2003)
-----------------------------------------------------------------------------
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)

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