title: oracle.jdbc.OracleCallableStatement cast exception
body: <p>I have a problem about casting a <code>CallableStatement</code> to <code>OracleCallableStatement</code>. It gives <code>ClassCastException</code> like this:</p>
  
  <pre><code>java.lang.ClassCastException:
      oracle.jdbc.driver.OracleCallableStatementWrapper cannot be cast to
      oracle.jdbc.driver.OracleCallableStatement
  </code></pre>
  
  <p>And the code is:</p>
  
  <pre><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></pre>
  
  <p>I tried to use spring jdbc template, but result was the same.</p>
  
  <p>I am using WebLogic 10.3.2 and the driver class of the datasource is default one. I'm also using the <code>ojdbc14.jar</code> in my project, the startup classpath does not include it.</p>
  
  <p>Any ideas?</p>
  
  <p>EDIT: These are the subclasses of the runtime wrapper class:</p>
  
  <pre><code>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
  </code></pre>