oracle.jdbc.OracleCallableStatement cast exception

burner3000

New Member
I have a problem about casting a CallableStatement to OracleCallableStatement. It gives ClassCastException like this:\[quote\] java.lang.ClassCastException: oracle.jdbc.driver.OracleCallableStatementWrapper cannot be cast to oracle.jdbc.driver.OracleCallableStatement\[/quote\]And the code is:\[code\] Connection conn = qdbDataSource.getConnection(); PreparedStatement pstmt = null; Connection conn2=((WLConnection)conn).getVendorConnection(); try{ CallableStatement cs = conn2.prepareCall("{ ?=call asr.bsc(?,?,?,?,?,?,?)}"); OracleCallableStatement ocs = (OracleCallableStatement)cs;\[/code\]I tried to use spring jdbc template also but result was the same. I am using weblogic 10.3.2 and the driver class of the datasource is default one. And also using the jar ojdbc14 in my project, my startup classpath does not include it.Any ideas?Thanks AliEDIT: These are the subclasses of the runtime wrapper class:\[quote\] weblogic.jdbc.wrapper.CallableStatement_oracle_jdbc_driver_OracleCallableStatementWrapper class weblogic.jdbc.wrapper.CallableStatement class weblogic.jdbc.wrapper.PreparedStatement class weblogic.jdbc.wrapper.Statement class weblogic.jdbc.wrapper.JDBCWrapperImpl class weblogic.utils.wrapper.WrapperImpl class java.lang.Object\[/quote\]
 
Back
Top