title: ComboPooledDataSource -com.sun.proxy.$Proxy78 cannot be cast to oracle.sql.CLOB
body: <p>I'm trying to use the C3P0 connection pool (com.mchange.v2.c3p0.ComboPooledDataSource c3p0-0.9.1.2.jar), but I'm receiving this error when trying to load an object holding a Clob (Oracle database):</p>
  
  <ul>
  <li>$Proxy78 cannot be cast to oracle.sql.CLOB</li>
  </ul>
  
  <p>Does anyone know how to solve this?</p>
  
  <p>full stack trace is as below </p>
  
  <blockquote>
    <p>Caused by: java.sql.SQLException: An SQLException was provoked by the
    following failure: java.lang.ClassCastException:
    com.sun.proxy.$Proxy78 cannot be cast to oracle.sql.CLOB
                    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
                    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
                    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
                    at com.mchange.v2.c3p0.impl.NewPooledConnection.handleThrowable(NewPooledConnection.java:432)
                    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.setClob(NewProxyPreparedStatement.java:535)
                    at org.hibernate.type.descriptor.sql.ClobTypeDescriptor$2$1.doBind(ClobTypeDescriptor.java:70)
                    at org.hibernate.type.descriptor.sql.ClobTypeDescriptor$1$1.doBind(ClobTypeDescriptor.java:56)
                    at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:91)
                    at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:283)
                    at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:278)
                    at org.hibernate.type.ComponentType.nullSafeSet(ComponentType.java:340)
                    at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2184)
                    at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2559)
                    ... 71 more Caused by: java.lang.ClassCastException: com.sun.proxy.$Proxy78 cannot be cast to oracle.sql.CLOB
                    at oracle.jdbc.driver.OraclePreparedStatement.setClob(OraclePreparedStatement.java:6559)
                    at oracle.jdbc.driver.OraclePreparedStatementWrapper.setClob(OraclePreparedStatementWrapper.java:158)
                    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.setClob(NewProxyPreparedStatement.java:521)
                    ... 79 more</p>
  </blockquote>