java.sql.SQLException:  Protocol violation

Posted on 2004-10-29
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(
   at oracle.jdbc.dbaccess.DBError.check_error(
   at oracle.jdbc.ttc7.Oclose.receive(
   at oracle.jdbc.ttc7.TTC7Protocol.close(
   at oracle.jdbc.driver.OracleStatement.close(
Question by:booksplus
    1 Comment
    LVL 22

    Accepted Solution

    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 (,, 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.


    <[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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Introduction A previously published article on Experts Exchange ("Joins in Oracle", makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
    This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

    933 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now