This discussion is archived
6 Replies Latest reply: Feb 4, 2013 7:48 AM by Joe Weinstein RSS

Cant cast java SQL Connection to OracleConnection

952932 Newbie
Currently Being Moderated
I am writing a Java program to get DataSource from wls10.3 to call DB SP.

I am able to get DataSource from wls10.3 and create Connection . But, I cant cast Java Connection to OracleConnection object.

Getting below exception:

Exception in thread "main" java.lang.ClassCastException: weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_1035_WLStub cannot be cast to oracle.jdbc.OracleConnection+

Please help me on this guys.

Thanks,
Hari

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points