Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Posts
    3

    Unanswered: protocol violation

    My Platform : Tomcat 4.0.4, Oracle9i (R2), Thin JDBC Driver (ojdbc14.jar), W2000

    Has anyone seen any of the following problems while accessing the Oracle via Thin JDBC drivers from JSP

    java.sql.SQLException: Protocol violation
    Io exception : Invalid Packet Lenght
    Io exception : Size Data Unit (SDU) mismatch

    Please help me to know what these problems are and what is the solution to avoid them. The surprising thing happening to me is that this problem does not come for the second run of the Tomcat. For your ready reference I am attaching the exception stack trace. (Just notice in the stack trace that oracle.jdbc.driver.OracleConnection is used while I think it should be oracle.jdbc.OracleConnection as oracle.jdbc.driver is replaced by oracle.jdbc package from Oracle9i onwards).

    Thanks



    java.sql.SQLException: Protocol violation
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBE rror.java:179)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.j ava:1160)
    at oracle.jdbc.ttc7.Ocommoncall.receive(Ocommoncall.j ava:149)
    at oracle.jdbc.ttc7.TTC7Protocol.setAutoCommit(TTC7Pr otocol.java:538)
    at oracle.jdbc.driver.OracleConnection.setAutoCommit( OracleConnection.java:1220)
    at com.uccs.db.DBConnection.getConnection(DBConnectio n.java:79)
    at com.uccs.db.DBUtils.getCountStar(DBUtils.java:809)

  2. #2
    Join Date
    Dec 2002
    Posts
    1

    Re: protocol violation

    Hi Nougain,

    Sorry, I was out for a vacation for some days and I missed your earlier reply among heap of mails.

    My application is also multithreaded. I am using reference to the same connection object in two threads, that should be the culprit. When I used two different connection objects for these two threads I am no more getting the " invalid packet length" error.

    Hope this will be helpful for you.

    Thanks
    Sreekumar

  3. #3
    Join Date
    Aug 2002
    Posts
    3
    >> My application is also multithreaded. I am using
    >> reference to the same connection object in two threads
    >> that should be the culprit. When I used two different
    >> connection objects for these two threads I am no more
    >> getting the " invalid packet length" error.

    YES in my old mail sent to you separately, I mentioned the same thing (ie using separate Connection in separate threads). I narrowed down to the same conclusion but did not test in my code as I was jumped to some more priority work. Glad to know that it works for you and also should work for me. It helps.

  4. #4
    Join Date
    Aug 2002
    Posts
    3

    One of the higest viewed thread (4th in this category)

    I just observed that it is one of the highest viewed thread in this category (688 so far). For the benefits of all those who tried/want the solution posted here please give feedback/findings/confirmations in this thread. Many Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •