ORA-00933 When Using Bind Variables in JDBC 11.2 (Doc ID 1304235.1)

Last updated on MARCH 08, 2017

Applies to:

JDBC - Version 10.2.0.4 and later
Information in this document applies to any platform.
***Checked for relevance on 24-Oct-2013***

Symptoms

When the following statement is executed manually in sqlplus or toad, it works successfully:

select v2.product_id, v2.price_list_id from PARTY_TYPE_RELEASE_VW v1,
PRODUCT_SLOT_SMALL_VW v2
where v1.product_id = v2.product_id
and v2.price_list_id = 'plist170004'
and v1.rank <= 1
and v1.party_id = 1815356
and v1.primary_type = 'POP'
order by v1.rank



Result:
PRODUCT_ID PRICE_LIST_ID
1000004005949311 plist170004


If the statement is executed with JDBC driver version 11.1, the result is also the expected.

However, if the same statement is run with JDBC driver 11 release 2, it fails with:


CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLException: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

[++SQLQuery++]
select v2.product_id, v2.price_list_id from PARTY_TYPE_RELEASE_VW v1, PRODUCT_SLOT_SMALL_VW v2 where v1.product_id = v2.product_id and v2.price_list_id = ?0 and v1.rank <= ?1 and v
1.party_id = ?2 and v1.primary_type = ?3 order by v1.rank
-- Parameters --
p[1] = {pd} plist170004 (java.lang.String)
p[2] = {pd} 1 (java.lang.Integer)
p[3] = {pd} 1815356 (java.lang.Integer)
p[4] = {pd} POP (java.lang.String)
[--SQLQuery--]

Changes

Upgrade from JDBC driver 11.1 to JDBC driver 11.2.

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