My Oracle Support Banner

Error 17147 With Named Parameters In 11.2 JDBC (Doc ID 1077237.1)

Last updated on MARCH 28, 2019

Applies to:

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


Named parameters (formal parameter binding) is not working with Oracle JDBC driver.

For example, a Stored Procedure having the following parameters:
testproc (login IN OUT varchar, pwd IN OUT varchar)

OracleCallableStatement cs =
(OracleCallableStatement)pconnection.prepareCall("begin testproc(?,?);end;");
cs.setString("login", "<LOGIN>");
cs.setString("pwd", "<PASSWORD>");

This will now end with the following exception:

SQLState: 99999
Message: Attempt to set a parameter name that does not occur in the SQL:login
Error Code: 17147

The following code confirms that named parameters are supported in 11.2 (this returns true)

DatabaseMetaData dmd = pconnection.getMetaData();
System.out.println("support for named params: " + dmd.supportsNamedParameters());


Upgrade the Oracle JDBC driver to


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

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.