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

x
?
Solved

>java.sql.SQLException: Protocol violation

Posted on 2006-06-02
7
Medium Priority
?
1,000 Views
Last Modified: 2012-06-27
Hi,

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.

0
Comment
Question by:immortalage
6 Comments
 
LVL 14

Expert Comment

by:hoomanv
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
0
 
LVL 8

Expert Comment

by:kaliyugkaarjun
ID: 16926242
By adding  the classes12.jar to your project properties java libraries will solve the problem.
0
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.
0
 

Author Comment

by:immortalage
ID: 16943456
Hi,

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.
0
 

Accepted Solution

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

CetusMOD
Community Support Moderator
0

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