If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Protocol violation with 10g drivers and single connection

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Apr 2004
Posts: 2
Protocol violation with 10g drivers and single connection

Hello all,

I've been searching on this problem for some days now, browsing through forums and FAQs to find an answer, re-coding, testing, ...

It concerns a JSP web application running on:
- JDK 1.4(.2)
- Oracle 9i (R2) / 10g Database
- Oracle 10g JDBC Thin driver
- Resin 2.1.8

We have written our own classes to handle database processes (creating and closing resultsets and statements, executing SQL, etc.). Our base class contains the connection (one for the whole application). This class is static and thus used for all users logged into the application. ResultSets and Statements are created when necessary and all of them are closed properly. Still, we repeatedly get the following error:

---

java.sql.SQLException: OALL8 is in an inconsistent state.
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:158)
at oracle.jdbc.driver.T4C8Oall.init(T4C8Oall.java:308 )
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStateme nt.java:97)
at oracle.jdbc.driver.T4CStatement.execute_for_descri be(T4CStatement.java:440)
at oracle.jdbc.driver.OracleStatement.execute_maybe_d escribe(OracleStatement.java:979)
at oracle.jdbc.driver.T4CStatement.execute_maybe_desc ribe(T4CStatement.java:483)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1096)
at oracle.jdbc.driver.OracleStatement.executeQuery(Or acleStatement.java:1276)
at be.winsome.lib.jdbc.statement.JDBCStatement.execut eQuery(JDBCStatement.java:67)
at be.winsome.lib.jdbc.record.RecordSet.executeQuery( RecordSet.java:359)
at be.winsome.lib.jdbc.statement.JDBCStatement.getRec ordSet(JDBCStatement.java:48)
...

---

This exception hardly occurs when only 1 user is working in the application. As soon as a second user logs on, it occurs much sooner and more frequently. In the end, a Protocol Violation error is logged:

---

java.sql.SQLException: Protocol Violation
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:158)
at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:206)
at oracle.jdbc.driver.DatabaseError.check_error(Datab aseError.java:1273)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java: 640)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStateme nt.java:112)
at oracle.jdbc.driver.T4CStatement.execute_for_descri be(T4CStatement.java:440)
at oracle.jdbc.driver.OracleStatement.execute_maybe_d escribe(OracleStatement.java:979)
at oracle.jdbc.driver.T4CStatement.execute_maybe_desc ribe(T4CStatement.java:483)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1096)
at oracle.jdbc.driver.OracleStatement.executeQuery(Or acleStatement.java:1276)
at be.winsome.lib.jdbc.statement.JDBCStatement.execut eQuery(JDBCStatement.java:67)
at be.winsome.lib.jdbc.record.RecordSet.executeQuery( RecordSet.java:359)
at be.winsome.lib.jdbc.statement.JDBCStatement.getRec ordSet(JDBCStatement.java:48)
...

---

In other words, it seems that the connection dies because of high workload: the more users log in, the more statements and result sets are created from the connection and executed simultaneously. This is more or less confirmed by one of the tests we've done: when opening and closing a connection for every statement - I know it's not the way to work, but we're debugging right - the application gets enormously slow of course, but the exceptions do NOT occur.

Oracle write this in their JDBC FAQs:

---

What does "Protocol Violation" mean?

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. There is no way to recover from this error. The connection is dead. You should try to close it, but that will probably fail too.

If you get a reproducible test case that generates this error, please file a TAR with Oracle Global Support. Be sure to specify the exact version numbers of the JDBC driver and the RDBMS, including any patches.

---

Doesn't sound very convincing, does it?

I've read a lot about connection pooling and the like, but I'm not an Oracle DBA so I don't know much about it. Could this be a solution for our problem? Any help would be greatly appreciated!

FYI, things we've tried and spotted under way:

- Two of our tables contained a column of type LONG. After I've read that these could generate problems, we've replaced them by CLOBs. Thanks to that, the 'Bigger type length than maximum' error we've also had in the past, doesn't seem to appear anymore.

- We've upgraded from Oracle 9i drivers to 10g. Using the latter, the errors occur less fast. After upgrading to Oracle 10g database as well, they occur even less fast, but they keep on occuring in the end...

- When using JDBC tracing, I don't get much wiser except for the following line that randomly appears: "SEVERE: oracle.jdbc.driver.T4CStatement.allocateTmpByteArr ay : Re-allocate byte array of size : 120" (the number at the end varies)

Sorry for the long post, but I wanted to give as much information as I could for those able to help.

TIA,
Stijn Lambert
sl@winsome.be
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On