OracleParameterMetaDataParser.computeBasicInfo - ArrayIndexOutOfBoundsException

(Doc ID 1600661.1)

Last updated on SEPTEMBER 19, 2014

Applies to:

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


Running the below code with JDBC driver generates the below exception

String sql = "select /*blah*/ name from btoal.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(
at oracle.jdbc.driver.OracleParameterMetaDataParser.getParameterMetaDataSql(
at oracle.jdbc.driver.OracleParameterMetaData.getParameterMetaData(
at oracle.jdbc.driver.OraclePreparedStatement.getParameterMetaData(
at oracle.jdbc.driver.OraclePreparedStatementWrapper.getParameterMetaData(
at JdbcPreparedStatement.main(


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