>java.sql.SQLException: Protocol violation

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.

immortalageAsked:
Who is Participating?
 
CetusMODConnect With a Mentor Commented:
PAQed with points refunded (250)

CetusMOD
Community Support Moderator
0
 
hoomanvCommented:
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
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
kaliyugkaarjunCommented:
By adding  the classes12.jar to your project properties java libraries will solve the problem.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
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
 
immortalageAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.