title: Class cast exception with oracle.jdbc.driver.OracleConnection
body: <p>I am getting Exception in first line of the below code</p>
  
  <blockquote>
    <p>java.lang.ClassCastException: oracle.jdbc.internal.OracleConnection$$EnhancerByProxool$$3415e85 cannot be cast to oracle.jdbc.driver.OracleConnection</p>
  </blockquote>
  
  <p>How can i convert string to <code>oracle.sql.Clob</code> and how to insert using <code>PreparedStatement</code>.</p>
  
  <pre><code>// con is java.sql.Connection object
  oracle.sql.CLOB newClob = oracle.sql.CLOB.createTemporary(con, false, oracle.sql.CLOB.DURATION_SESSION);
  
  newClob.putString(1,transcript); 
  pstmt.setClob(1, newClob);
  pstmt.setString(2, StringUtils.dateToMillis(endTime));
  pstmt.setString(3, sessionID);
  int count = pstmt.executeUpdate();
  System.out.println("updated count ::"+count);
  System.out.println("transcript updated....");
  </code></pre>