My Oracle Support Banner

"begin ? := {call HELLOWORLD(?)}; end;" Syntax Fails With ORA-06550 And PLS-00103 When using JDBC; It Works With JDBC (Doc ID 1322478.1)

Last updated on FEBRUARY 03, 2019

Applies to:

JDBC - Version: and later   [Release: 11.2 and later ]
Information in this document applies to any platform.


Using JDBC (ojdbc6.jar) and JDK 1.6, a java program using the statements below works as expected:

CallableStatement cstmt = conn.prepareCall("begin ? := HELLOWORLD(?); end;");


CallableStatement cstmt = conn.prepareCall("{? = call HELLOWORLD (?)}");

However, with the following syntax for the same statement, it fails:

CallableStatement cstmt = conn.prepareCall("begin ? := {call HELLOWORLD(?)}; end;");

java TestJDBCcall
JDBC driver version is
java.sql.SQLException: ORA-06550: line 1, column 14:
PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following:

( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternatively-quot
ORA-06550: line 1, column 41:
PLS-00103: Encountered the symbol ";" when expecting one of the following:

end not pragma final instantiable order overriding static
member constructor map

at oracle.jdbc.driver.T4CTTIoer.processError(
at oracle.jdbc.driver.T4CTTIoer.processError(
at oracle.jdbc.driver.T4C8Oall.processError(
at oracle.jdbc.driver.T4CTTIfun.receive(
at oracle.jdbc.driver.T4CTTIfun.doRPC(
at oracle.jdbc.driver.T4C8Oall.doOALL(
at oracle.jdbc.driver.T4CCallableStatement.doOall8(
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(
at oracle.jdbc.driver.OraclePreparedStatement.execute(
at oracle.jdbc.driver.OracleCallableStatement.execute(
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(
at TestJDBCcall.main(

All the above statements work with no issues when using JDBC


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

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process, and therefore has not been subject to an independent technical review.

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