JDBC Thin Application Gets Protocol Violation Error When Running Large Queries due to TNS: Bad Packet Type

(Doc ID 1096385.1)

Last updated on MAY 19, 2017

Applies to:

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


A JDBC thin application  fails to execute a large query.
However, when running a smaller but similar query with the same client application and database, it succeeds.

The client error is:  java.sql.SQLException: Protocol violation

Exception in thread "main" java.sql.SQLException: Protocol violation
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:853)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1145)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1267)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1469)
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:389)

The server-side sqlnet.log reports a TNS: Bad Packet


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