My Oracle Support Banner

Java.lang.ClassCastException: Javax.sql.rowset.serial.SerialClob Cannot Be Cast To Oracle.sql.CLOB Is Reported While Passing A SerialClob Object As Parameter In The setClob Method Of A Statement (Doc ID 2024807.1)

Last updated on JUNE 30, 2015

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


On : version, Thin JDBC driver

When attempting to insert a Clob into the database using the next code:

the following error occurs:

java.lang.ClassCastException: javax.sql.rowset.serial.SerialClob cannot be cast to oracle.sql.CLOB
at oracle.jdbc.driver.OraclePreparedStatement.setClobInternal(
at oracle.jdbc.driver.OracleCallableStatement.setClob(
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setClob(
at test.runner.Run.main(


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.