Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 75385 invoked from network); 20 Oct 2003 17:54:56 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 20 Oct 2003 17:54:56 -0000 Received: (qmail 85614 invoked by uid 500); 20 Oct 2003 17:54:44 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 85545 invoked by uid 500); 20 Oct 2003 17:54:44 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 85531 invoked from network); 20 Oct 2003 17:54:43 -0000 Received: from unknown (HELO daveoxley.co.uk) (81.128.156.156) by daedalus.apache.org with SMTP; 20 Oct 2003 17:54:43 -0000 Received: (from root@localhost) by daveoxley.co.uk (8.12.5/8.12.5) id h9KHsjQN018755 for commons-dev@jakarta.apache.org; Mon, 20 Oct 2003 18:54:45 +0100 Received: from daveoxley.co.uk (daves [192.168.0.2])(authenticated bits=0)by daveoxley.co.uk (8.12.5/8.12.5) with ESMTP id h9KHsif8018713(version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO)for ; Mon, 20 Oct 2003 18:54:45 +0100 Message-ID: <3F94216E.6090409@daveoxley.co.uk> Date: Mon, 20 Oct 2003 18:54:54 +0100 From: Dave Oxley Reply-To: Dave@JungleMoss.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030924 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Developer List Subject: [DBCP] Bug with Poolable PreparedStatements and DriverAdapterCPDS Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-scanner: scanned by Inflex 1.0.12.3 - (http://pldaniels.com/inflex/) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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