SQLException: Protocol Violation in oracle

Saurav  picture Saurav · Mar 31, 2015 · Viewed 45.3k times · Source

I am getting the "Protocol Violation". I have an application running on RedHat Linux.The database and the application are co-resident on the machine.

Oracle version used: Oracle 11g R2 (11.2.0.3.0)
JDBC Driver used: 12.1.0.1
Java used: jdk1.7.0.65 32-bit

I have come across many forums where this error has been pointed out to be a driver issue but in all those forums the oracle version used was higher and the driver version were older and changing the driver resolved the issue.But in my case the Oracle version is lower but driver version is higher.So , in this case will the higher version of the the driver could be a problem?

Also, this protocol violation can also arise when the maximum number of connections on the DB is reached ?

Error Message:

java.sql.SQLException: Protocol violation: [72] at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:464) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493)

Answer

Tian Na picture Tian Na · Aug 26, 2016

Increase the heap space!

I had this exact error appearing randomly.

The application was running out of memory and the OutOfMemory error was lost due to the logic in the code which resulted in an unrelated exception being thrown.

One of the reasons applications shouldn't handle throwables and errors.