My Oracle Support Banner

Driver Protocol Violation When Retrieve Autogen Keys Using JDBC Driver (Doc ID 828765.1)

Last updated on JULY 27, 2019

Applies to:

JDBC - Version 10.2.0.3 and later
Information in this document applies to any platform.
This problem can occur on any platform.


Symptoms

-- Problem Statement:
On 10.2.0.1 in Production:
Oracle Database 10g Relase 2 (10.2.0.4.0) and JDBC Driver giving Protocol violation when attempting to retrieve autogenerated keys.

Following the example code available at this link

http://download-uk.oracle.com/docs/cd/B19306_01/java.102/b14355/jdbcvers.htm#sthref110

Running the program to retrieve an autogenerated key, the following error is produced:


ERROR

java.sql.SQLException: Protocol violation
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:190)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:286)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:766)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1135)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1311)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3500)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3584)
at AutoGeneratedKeysTest.doit(AutoGeneratedKeysTest.java:40)
at AutoGeneratedKeysTest.main(AutoGeneratedKeysTest.java:8)


Output from java –version:

java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)


The problem is reproduced using the 10.2.0.4 and the 10.2.0.3 JDBC drivers. Both give the same
results.


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
Cause
Solution


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