This exception is caused because the method requires an Oracle implementation of the Connection interface. You have two ways to retrieve this connection.
1) Use a mechanism within the API to retrieve it from org.apache.commons.dbcp.cpdsadapter.ConnectionImpl or 2) Use the Oracle connection pool, which returns it directly Note that if you choose option 1, you must never close the Oracle connection directly or you will corrupt the connection pooling mechanism. Also, an API may not exist that supports option 1, in which case you are forced into option 2. Robert Egan -----Original Message----- From: Akshay Kapur [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 8:41 PM To: [EMAIL PROTECTED] Subject: Exception when accessing oracle.sql.ArrayDescriptor Please let me know if you may know a solution to the Exception described below. Thanks Akshay The following line of code - Connection conn = Torque.getConnection(); ArrayDescriptor myarray = ArrayDescriptor.createDescriptor( "SOME_STRING", conn ); throws the following exception - Exception Trace: java.lang.ClassCastException: org.apache.commons.dbcp.cpdsadapter.ConnectionImpl at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:87) at ... ... I am using - torque-3.0.1.jar commons-dbcp-1.0.jar classes12.zip Database - Oracle 8i Configuration of Torque.properties - torque.database.default=mydb torque.database.mydb.adapter=oracle ## Using torque's old pool torque.dsfactory.mydb.factory=org.apache.torque.dsfactory.TorqueDataSourceFa ctory torque.dsfactory.mydb.pool.defaultMaxConnections=10 torque.dsfactory.mydb.pool.maxExpiryTime=3600 torque.dsfactory.mydb.pool.connectionWaitTimeout=10 torque.dsfactory.mydb.connection.driver = oracle.jdbc.driver.OracleDriver torque.dsfactory.mydb.connection.url = jdbc:oracle:oci8:@abc torque.dsfactory.mydb.connection.user = xxx torque.dsfactory.mydb.connection.password = yyy ************************************************************************* PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. ************************************************************************* --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
