getParameterMetaData Causes ArrayIndexOutOfBoundsException After Upgrade To JDBC 12C

(Doc ID 2064720.1)

Last updated on SEPTEMBER 21, 2017

Applies to:

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

Symptoms

 After upgrade JDBC Driver to 12.1.0.x, getParameterMetaData causes ArrayIndexOutOfBoundsException.

 Stack examples:

   java.lang.ArrayIndexOutOfBoundsException: -5
    at oracle.jdbc.driver.OracleParameterMetaDataParser.computeBasicInfo(OracleParameterMetaDataParser.java:277)
    at oracle.jdbc.driver.OracleParameterMetaDataParser.getParameterMetaDataSql(OracleParameterMetaDataParser.java:433)
    at oracle.jdbc.driver.OracleParameterMetaData.getParameterMetaData(OracleParameterMetaData.java:58)
    at oracle.jdbc.driver.OraclePreparedStatement.getParameterMetaData(OraclePreparedStatement.java:12861)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.getParameterMetaData(OraclePreparedStatementWrapper.java:1551)
    at ConsoleTestForBug.doTest(ConsoleTestForBug.java:78)
    at ConsoleTestForBug.main(ConsoleTestForBug.java:30)

 
 java.lang.ArrayIndexOutOfBoundsException: -5
   at oracle.jdbc.driver.OracleParameterMetaDataParser.computeBasicInfo(OracleParameterMetaDataParser.java:276)
   at oracle.jdbc.driver.OracleParameterMetaDataParser.getParameterMetaDataSql(OracleParameterMetaDataParser.java:432)
   at oracle.jdbc.driver.OracleParameterMetaData.getParameterMetaData(OracleParameterMetaData.java:58)
   at oracle.jdbc.driver.OraclePreparedStatement.getParameterMetaData(OraclePreparedStatement.java:11621)
   at oracle.jdbc.driver.OraclePreparedStatementWrapper.getParameterMetaData(OraclePreparedStatementWrapper.java:1552)
   at Ojdbc7Error.main(Ojdbc7Error.java:70)

 
 java.lang.ArrayIndexOutOfBoundsException: 128
   at oracle.jdbc.driver.OracleParameterMetaDataParser.computeBasicInfo(OracleParameterMetaDataParser.java:327)
   at oracle.jdbc.driver.OracleParameterMetaDataParser.getParameterMetaDataSql(OracleParameterMetaDataParser.java:433)
   at oracle.jdbc.driver.OracleParameterMetaData.getParameterMetaData(OracleParameterMetaData.java:60)
   at oracle.jdbc.driver.OraclePreparedStatement.getParameterMetaData(OraclePreparedStatement.java:12861)
   at oracle.jdbc.driver.OraclePreparedStatementWrapper.getParameterMetaData(OraclePreparedStatementWrapper.java:1551)
   at JdbcTest.main(JdbcTest.java:58)


It works fine if you use JDBC drivers version 11.2.0.x.

Changes

 Upgrade JDBC Driver to 12c.

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