My Oracle Support Banner

JDBC Thin Application Gets Protocol Violation Error When Running Large Queries due to TNS: Bad Packet Type (Doc ID 1096385.1)

Last updated on AUGUST 09, 2023

Applies to:

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


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(
at oracle.jdbc.driver.T4CTTIfun.doRPC(
at oracle.jdbc.driver.T4C8Oall.doOALL(
at oracle.jdbc.driver.T4CStatement.doOall8(
at oracle.jdbc.driver.T4CStatement.executeForDescribe(
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
at oracle.jdbc.driver.OracleStatement.executeQuery(
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(

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




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.