My Oracle Support Banner

"java.lang.NegativeArraySizeException" While Saving A CLOB To The Database (Doc ID 2757479.1)

Last updated on MARCH 04, 2021

Applies to:

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

Symptoms

Oracle JDBC Driver throws java.lang.NegativeArraySizeException exception when saving a large CLOB.

ERROR

...
Caused by: java.lang.NegativeArraySizeException
                 at oracle.jdbc.driver.T4C8TTIClob.write(T4C8TTIClob.java:379)
                 at oracle.jdbc.driver.T4CConnection.putChars(T4CConnection.java:4078)
                 at oracle.jdbc.driver.OracleClob.putChars(OracleClob.java:523)
                 at oracle.jdbc.driver.OracleClob.setString(OracleClob.java:892)
                 at oracle.sql.CLOB.setString(CLOB.java:941)
                 at oracle.jdbc.driver.OraclePreparedStatement.setStringForClobCritical(OraclePreparedStatement.java:5043)
                 at oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:4904)
                 at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:4854)
                 at oracle.jdbc.driver.OraclePreparedStatementWrapper.setString(OraclePreparedStatementWrapper.java:255)

Changes

 

Cause

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
Symptoms
Changes
Cause
Solution


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