You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/11/24 08:29:37 UTC
DO NOT REPLY [Bug 32375] New: -
ClassCastException while using OracleCallableStatement with DBCP -Urgent
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32375>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32375
Summary: ClassCastException while using OracleCallableStatement
with DBCP -Urgent
Product: Commons
Version: unspecified
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: major
Priority: P1
Component: Dbcp
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: eldoitteera@yahoo.com
CC: dirk.verbeeck@pandora.be
I am getting a ClassCastException :
org.apache.commoms.dbcp.DelegationgCallableStatement
while using DBCP1.2.1. I am using commons-dbcp1.2.1 with TomCat 4.1.29. to get
the DBCPConnectionPool Object.
I use the OracleCallableStatement Object to call the geCursor() to retrieve the
Cursor
Please see the Code snippet which generates error
Connection conn=null;
CallableStatement stmt=null;
ResultSet rs=null;
try{
//datasource will contain the javax.sql.DataSource after lookup
//Here we get the org.apache.commons.dbcp.PoolableConnection Object
conn=dataSource.getConnection();
stmt=conn.prepareCall(sql);
stmt.registerOutParameter(1,OracleTypes.CURSOR);
....//set the statement object values here
stmt.execute();
//get the Cursor here, here we get the ClassCastException
rs=((OracleCallableStatement)stmt).getCursor(1);
As an alternative, I tried to use the DelegatingConnection.getInnremostDelegate
() to get the underlying connection and create the statement object from that.
Still I get the same exception.
As this is an existing code, i have to use the OracleCallableStatement to get
the Cursor.
Can you please suggest a work around for this ASAP
Thanks
Eldo Itteera
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org