[Last Call] Learn how to a build a cloud-first strategyRegister Now


>java.sql.SQLException: Protocol violation

Posted on 2006-06-02
Medium Priority
Last Modified: 2012-06-27

I am getting protocol violation while updating data in the database. However it works from different machine perfectly fine.
Exception is as follows :
>java.sql.SQLException: Protocol violation

Also, it works fine if the following line is commented in code.
// AvailabilityStatsBean statusResponse = getAvailibilityStats(orderBean);

The data gets perfectly updated to the database with an irrelevant line being commented.

Does this exception occur due to incorrect java versions. The oracle driver we are using is ojdbc14.jar

Kindly assist.

Question by:immortalage
LVL 14

Expert Comment

ID: 16822389
The Thin driver throws this exception when it reads something from the RDBMS that it did not expect. This means that the protocol engine in the Thin driver and the protocol engine in the RDBMS are out of synch

Expert Comment

ID: 16926242
By adding  the classes12.jar to your project properties java libraries will solve the problem.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 30

Expert Comment

by:Mayank S
ID: 16926525
I think it is already in the Java libraries included otherwise it would've thrown class not found exception for the driver or data-source SQL exception saynig unable to load driver.

Author Comment

ID: 16943456

The problem got resolved by replacing the ojdbc14.jar with the latest version and adding two parameters to the virtual machine
"-Duser.language=en -Duser.country=US" (there is a bug in this driver and it fails if locale is not set).
The bug in this driver corrupts the connection thereby we are not able to perform any further transactions using the same connection.

Accepted Solution

CetusMOD earned 0 total points
ID: 17152184
PAQed with points refunded (250)

Community Support Moderator

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This video teaches viewers about errors in exception handling.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month18 days, 5 hours left to enroll

829 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