My Oracle Support Banner

OracleParameterMetaDataParser.computeBasicInfo - ArrayIndexOutOfBoundsException (Doc ID 1600661.1)

Last updated on MARCH 27, 2019

Applies to:

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

Symptoms

Running the below code with 12.1.0.1 JDBC driver generates the below exception

String sql = "select /*blah*/ name from student where name = :1";
ParameterMetaData m = connection.prepareStatement(sql).getParameterMetaData();
System.out.println(String.format("Parameter count = %s", m.getParameterCount()));

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at oracle.jdbc.driver.OracleParameterMetaDataParser.computeBasicInfo(OracleParameterMetaDataParser.java:199)
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 JdbcPreparedStatement.main(JdbcPreparedStatement.java:22)

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.