Getting ArrayIndexOutOfBoundsException When Doing ExecuteBatch With Oracle JDBC Driver 12.1.0.2 (Doc ID 1985195.1)

Last updated on MARCH 23, 2016

Applies to:

JDBC - Version 12.1.0.2.0 to 12.1.0.2.0 [Release 12.1]
Information in this document applies to any platform.

Symptoms

A JAVA program runs for several hours batching data to the database on a regular basis. After upgrading to Oracle 12.1.0.2 JDBC driver, ArrayIndexOutOfBoundsException exception is received after 2-4 hours of execution.

STACKTRACE:

kodo.util.FatalDataStoreException: java.lang.ArrayIndexOutOfBoundsException: -1
at kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:1050)
at kodo.query.AbstractQuery.isInMemory(AbstractQuery.java:999)
at kodo.query.AbstractQuery.executeWithArray(AbstractQuery.java:830)
at kodo.query.DelegatingKodoQuerySPI.executeWithArray(DelegatingKodoQuerySPI.java:105)

NestedThrowablesStackTrace:
java.lang.ArrayIndexOutOfBoundsException: -1
at oracle.jdbc.driver.OraclePreparedStatement.setupDbaBindBuffers(OraclePreparedStatement.java:3528)
at oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers(OraclePreparedStatement.java:3046)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:12194)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:246)
at com.solarmetric.jdbc.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:325)
at com.solarmetric.jdbc.PoolConnection$PoolPreparedStatement.executeBatch(PoolConnection.java:377)
at com.solarmetric.jdbc.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:325)

Th issue does not occur when using JDBC driver 11.2.0.3.

Setting oracle.jdbc.bindUseDBA=false does not nake a difference.

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms