[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

java.sql.SQLException:  Protocol violation

Posted on 2004-10-29
1
Medium Priority
?
16,091 Views
Last Modified: 2013-12-11
Got this error closing a Statement object - what does this error below mean??

java.sql.SQLException:  Protocol violation
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
   at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
   at oracle.jdbc.ttc7.Oclose.receive(Oclose.java)
   at oracle.jdbc.ttc7.TTC7Protocol.close(TTC7Protocol.java)
   at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java)
0
Comment
Question by:booksplus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 22

Accepted Solution

by:
Helena Marková earned 375 total points
ID: 12470728
If you are using JDBC Thin then this Metalink note can help - Note:66677.1:

When trying to run a JDBC Thin application, it is getting the error:

java.sql.sqlexception Protocol Violation.

Problem Explanation
-------------------

In most cases, this error is a symptom of a bug.

Below are some of the known bugs that give this error message:

<[BUG:655102]> - caused by attempting to fetch from a column declared as CHAR(254) - fixed in JDBC 8.0.6 (OCI and Thin)

<[BUG:1069768]> - cuased by attempting to receive a struct into a resultset - fixed in JDBC 8.1.7 (OCI) and JDBC 8.1.6(Thin)

<[BUG:1139204]> - caused by binding more then 250 parameters to a statement - fixed in JDBC 8.1.7 (OCI) and JDBC 8.1.6 (Thin)

Below are some other situations that have been known to cause this error:

- When the user password has expired, due to bug:1668134.

- When the JDK versions are not in sync with the proper driver file (classes111.zip, classes12.zip, ojdbc14.jar).

- When the version of the drivers are older than the version of the server.

Problem Solution
----------------

In most cases, this error is a symptom of a bug. The causes of each bug are always unique. A test case will need to be generated by the customer to illustrate how to reproduce the problem.

If the cause is known, you would apply the particular Oracle patch.

Always, upgrade the JDBC Driver to the latest version available and see if the problem reproduces before contacting Oracle Support.

Note, if you are using the JDBC OCI driver, the entire Oracle client would need to be upgraded to the latest version.

References
----------

<[BUG:618721]> java.sql.sqlexception: Protocol Violation on Selecting Large (Amount of) Data
<[BUG:602357]> Protocol Violation Error After Several Operations
<[BUG:1139204]> Protocol Violation if More (Than) 250 Parameters in Callable Statement
<[BUG:655102]> CHAR(254) Datatype Results in Protocol Violation
<[BUG:1069768]> Thin Driver Gives Protocol Violation While Receiving Struct
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question