1 2 Previous Next 25 Replies Latest reply on Aug 24, 2011 3:09 PM by Joe Weinstein-Oracle

    PROTOCOL VIOLATION JAVA ERROR ORACLE 11g

    873455

      I made a migration from Oracle 10g to Oracle 11g and I had the following problem with a Java application. This throws an error "PROTOCOL VIOLATION." JDBC Drivers have actalizado but the error continues. Some will feature in Oracle 11g I have to disable? I hope your answer soon.

      thanks
      i attach the java error

      java.sql.SQLException: Protocol violation
      at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:418)
      at oracle.jdbc.ttc7.Oclose.receive(Oclose.java:136)
      at oracle.jdbc.ttc7.TTC7Protocol.closeQuery(TTC7Protocol.java:406)
      at oracle.jdbc.driver.OracleResultSet.internal_close(OracleResultSet.java:145)
      at oracle.jdbc.driver.OracleResultSet.next(OracleResultSet.java:81)
      at org.apache.jsp.ditLogin_005f2_jsp._jspService(ditLogin_005f2_jsp.java:171)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at jespa.http.HttpSecurityService.doFilter(HttpSecurityService.java:957)
      at com.total.security.HttpSecurityFilter.doFilter(HttpSecurityFilter.java:180)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Unknown Source)

        • 1. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
          Joe Weinstein-Oracle
          The issue is obvious (to me) in this line of the exception:

          at oracle.jdbc.ttc7.TTC7Protocol.closeQuery(TTC7Protocol.java:406)

          The 'ttc7' tells me that the driver version being used is very old,
          and incompatible with the new DBMS version. Just update the driver.
          HTH,
          Joe
          • 2. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
            873455
            I used the latest drivers (jdbc1.6) downloaded from the website of oracle but the error is the same.
            Tell me if I have to update anything else.


            Thanks for responding.
            • 3. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
              Joe Weinstein-Oracle
              Show me the new exception (full stack). I'll bet you're still using the old driver. Remove that jar from the machine.
              • 4. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                jschellSomeoneStoleMyAlias
                Remove that jar from the machine.
                Better still...

                Remove all jars.
                Insure that you get a class not found exception.
                Then add the new jar.

                Second step insures that you have in fact removed all possible jars.
                • 5. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                  873455
                  i try it, i remove all .jar and i add one by one and the problem persist. the same Error at the top.
                  • 6. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                    Joe Weinstein-Oracle
                    Alter the code where you get the connection to print out this:

                    System.out.println("The driver is " + conn.getMetaData().getDriverVersion() );

                    and show us what it prints.
                    • 7. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                      873455
                      The version result is *8.0.5.2.0*

                      Thanks for your help me
                      • 8. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                        873455
                        i think the problen was in Class12.jar
                        • 9. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                          Joe Weinstein-Oracle
                          Yep. That proves you're using an ancient driver. You need to get control of
                          your classpath and get a recent ojdbc5 or ojdbc6 jar at the front of it.
                          • 10. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                            Joe Weinstein-Oracle
                            Put this in your code:

                            System.out.println("The classpath is " + System.getProperty("java.class.path") );
                            • 11. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                              873455
                              hello, first of all I want to thank you for helping me with this issue.

                              I deleted the library and add the library Class12.jar orai18n.jar and the application has compiled. but the error still appears. Imports replace the following in the code is not missing something else.


                              import oracle.jdbc.OracleDriver;
                              import oracle.jdbc.OracleTypes;
                              import oracle.jdbc.OracleCallableStatement;
                              // MB 13/07 import oracle.jdbc.driver.OracleCallableStatement;
                              //import oracle.jdbc.driver.OracleTypes;
                              // MB 13/07import oracle.jdbc.OracleDriver.*; //MB 11/07


                              Thank you for everything!
                              • 12. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                                Joe Weinstein-Oracle
                                What does

                                System.out.println("The classpath is " + System.getProperty("java.class.path") );

                                show? What version does the driver report itself as now?
                                • 13. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                                  Tolls
                                  870452 wrote:
                                  hello, first of all I want to thank you for helping me with this issue.

                                  I deleted the library and add the library Class12.jar orai18n.jar and the application has compiled. but the error still appears. Imports replace the following in the code is not missing something else.
                                  Why are you adding the classes12 file back in?
                                  That's the one causing the problem.
                                  • 14. Re: PROTOCOL VIOLATION JAVA ERROR ORACLE 11g
                                    873455
                                    Excuseme, It's my mistake.

                                    With the Library Manager I added a ojdbc6.jar and orai18n.jar.

                                    Then I replaced this lines in the code :
                                    import oracle.jdbc.driver.OracleCallableStatement;
                                    import oracle.jdbc.driver.OracleTypes;
                                    import oracle.jdbc.OracleDriver.*;

                                    With this lines:
                                    import oracle.jdbc.OracleDriver;
                                    import oracle.jdbc.OracleTypes;
                                    import oracle.jdbc.OracleCallableStatement;


                                    But when I triyed login the result is:
                                    java.sql.SQLException: Protocol violation (Detalles)



                                    java.sql.SQLException: Protocol violation
                                         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:418)
                                         at oracle.jdbc.ttc7.Oclose.receive(Oclose.java:136)
                                         at oracle.jdbc.ttc7.TTC7Protocol.closeQuery(TTC7Protocol.java:406)
                                         at oracle.jdbc.driver.OracleResultSet.internal_close(OracleResultSet.java:145)
                                         at oracle.jdbc.driver.OracleResultSet.next(OracleResultSet.java:81)
                                         at org.apache.jsp.ditLogin_005f2_jsp._jspService(ditLogin_005f2_jsp.java:171)
                                         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
                                         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                                         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
                                         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
                                         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
                                         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                                         at jespa.http.HttpSecurityService.doFilter(HttpSecurityService.java:957)
                                         at com.total.security.HttpSecurityFilter.doFilter(HttpSecurityFilter.java:180)
                                         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                                         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                                         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
                                         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                                         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                                         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                                         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                                         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
                                         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
                                         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
                                         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
                                         at java.lang.Thread.run(Unknown Source)


                                    My classpath is:
                                    .;C:\Program Files\Java\jre6\lib\ext\QTJava.zip;ORACLE_HOME/jdbc/lib/ojdbc6.jar;ORACLE_HOME/jlib/orai18n.jar

                                    and the Java Home in the Environment Variables is
                                    C:\Program Files\Java\jdk1.6.0_18

                                    You or somebody can I help me?
                                    Best Regards
                                    1 2 Previous Next