My Oracle Support Banner

Connection.Preparestatementgets ArrayIndexOutOfBoundsException When IN Parameters >7 (Doc ID 1226193.1)

Last updated on AUGUST 09, 2019

Applies to:

JDBC - Version 11.1.0.6 to 11.1.0.6 [Release 11.1]
Information in this document applies to any platform.

Symptoms


Using Jdbc driver 11.1.0.6.0 a problem with 'INSERT' type PreparedStatement creation when statement has generated keys array. When INSERT has 7 or less fields as values everything going well, but if INSERT is using 8 or more fields, method prepareStatement(String,String[]) throws exception. Here is java code:



Output is:

7-field row id = 22
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 8
at oracle.jdbc.driver.OracleSql.computeBasicInfo(OracleSql.java:950)
at oracle.jdbc.driver.OracleSql.getSqlKind(OracleSql.java:623)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:1212)
at oracle.jdbc.driver.T4CPreparedStatement.<init>(T4CPreparedStatement.java:28)
at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:68)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3059)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:2961)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:5940)

 

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.