6 Replies Latest reply: Feb 4, 2013 9:48 AM by Joe Weinstein-Oracle RSS

    Cant cast java SQL Connection to OracleConnection

    952932
      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