My Oracle Support Banner

setAsciiStream With Non-ASCII Characters Fails With ArrayIndexOutOfBoundException In executeUpdate (Doc ID 369798.1)

Last updated on MAY 15, 2023

Applies to:

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

Symptoms

When using PreparedStatement.setAsciiStream to bind a byte array >4096 bytes to a CLOB column,


the executeUpdate() operation fails with

java.lang.ArrayIndexOutOfBoundsException: 4096
  at oracle.sql.CharacterSet.convertJavaCharsToUTFBytes(CharacterSet.java:1254)
  at oracle.jdbc.driver.DBConversion.javaCharsToCHARBytes(DBConversion.java:736)
  [...]
  at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2916)
  at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2988)

when the byte array contains a non-ASCII value.

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
References


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