My Oracle Support Banner

java.sql.SQLException: Protocol violation When Reading CLOB (Doc ID 1616830.1)

Last updated on MAY 25, 2023

Applies to:

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


When reading clobs from AL32UTF8/UTF-8 database, the JDBC thin driver returns the error Protocol violation: [ 14, 121, ]

The problem usually occurs  when a clob data of length 4193 is selected from a table in a UTF-8/AL32UTF8 database.

Caused by: java.sql.SQLException: Protocol violation: [ 0, ]
at oracle.jdbc.driver.T4CTTIfun.receive( ~[ojdbc7.jar:]
at oracle.jdbc.driver.T4CTTIfun.doRPC( ~[ojdbc7.jar:]
at oracle.jdbc.driver.T4C8TTIBlob.createTemporaryLob( ~[ojdbc7.jar:]
at oracle.jdbc.driver.T4CConnection.createTemporaryBlob( ~[ojdbc7.jar:]
at oracle.sql.BLOB.createTemporary( ~[ojdbc7.jar:]
at oracle.jdbc.driver.OraclePreparedStatement.setBinaryStreamContentsForBlobCritical( ~[ojdbc7.jar:]
at oracle.jdbc.driver.OraclePreparedStatement.setBlobInternal( ~[ojdbc7.jar:]
at oracle.jdbc.driver.OraclePreparedStatement.setBlob( ~[ojdbc7.jar:]
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setBlob( ~[ojdbc7.jar:]
at weblogic.jdbc.wrapper.PreparedStatement.setBlob( ~[com.bea.core.datasource6_1.10.0.0.jar:] Protocol violation: [ 14, 121, ] at
 oracle.jdbc.driver.OracleClobReader.needChars( at at
 Ojdbc7ClobReaderTest.main( Suppressed:
 java.sql.SQLException: Protocol violation: [ 0, ] at
 oracle.jdbc.driver.T4CTTIfun.receive( at
oracle.jdbc.driver.T4CTTIfun.doRPC( at
 oracle.jdbc.driver.T4C7Ocommoncall.doOLOGOFF( at
 oracle.jdbc.driver.T4CConnection.logoff( at
 oracle.jdbc.driver.PhysicalConnection.close( at
 Ojdbc7ClobReaderTest.main( Caused by:
 java.sql.SQLException: Protocol violation: [ 14, 121, ] at
 oracle.jdbc.driver.T4CTTIfun.receive( at
 oracle.jdbc.driver.T4CTTIfun.doRPC( at at
 oracle.jdbc.driver.T4CConnection.getChars( at
 oracle.sql.CLOB.getChars( at


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.