Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLException: Protocol violation

694439Apr 3 2009 — edited Apr 3 2009
HI all,

I have a problem whit jdbc driver and oracle 10. My Java web application, which runs with JDK1.5, uses a connection pool to get connections to an Oracle 10.2.0.4 database. The connection pool looks like this:
<datasources>
<local-tx-datasource>
<jndi-name>biocatDataSource</jndi-name>
<connection-url>jdbc:oracle:thin:@${MY_HOST}:1521:${MY_SID}</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>${MY_USER_ID}</user-name>
<password>${MY_PASSWORD}</password>
<min-pool-size>4</min-pool-size>
<max-pool-size>25</max-pool-size>
<prepared-statement-cache-size>10</prepared-statement-cache-size>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>1</idle-timeout-minutes>
<new-connection-sql>select 1 from dual</new-connection-sql>
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
<track-statements>true</track-statements>
</local-tx-datasource>
</datasources>

This has worked fine for very long, but starting a few days ago I started getting this error everytime the code tries to write (insert or update) into the db:
java.sql.SQLException: Protocol violation

The oracle code error is 17401

Trying to use another client like SqlDeveloper I can write with no problems.

Googleing for this error seems it is related to bad jdbc driver version, but it doesn't look the case...since my application uses JDK1.5., I'm using ojdbc14.jar, and it worked fine for a long time.

My DBA saied that the only thing that is changed in last days is that he setted this parameter:
cursor_sharing=SIMILAR
instead of EXACT
But I have no idea if this could be related to my problem.

Does any of you have any idea of how to solve this?
Many thanks in advance for your help!!

Mattia
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2009
Added on Apr 3 2009
1 comment
12,156 views