Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Protocol Violation

 
Sylvia H Charbonneau
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Day All !
I've switched from using an OCI driver to using the Oracle thin driver. The following code is used to attempt making a connection to an Oracle 8.1.7 runnig on an NT workstation:
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
connPool[i] = DriverManager.getConnection ("jdbcracle:thin:@NT-w01:1526Bsylvia", dbLogin, dbPassword);

There error I receive is a "Protocol Violation", with the following stack trace.
java.sql.SQLException: Protocol violation
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:631)
at oracle.jdbc.ttc7.O3log.receive2nd(O3log.java:529)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:214)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:142)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:214)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:193)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:172)
at com.javaexchange.dbConnectionBroker.myBroker.createConn(myBroker.java:357)
at com.javaexchange.dbConnectionBroker.myBroker.<init>(DbConnectionBroker.java:97)
at myweb.myServlet.init(myServlet.java:32)
at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
at org.apache.catalina.core.StandardWrapper.allocate(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.valves.AccessLogValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.connector.http.HttpProcessor.process(Unknown Source)
at org.apache.catalina.connector.http.HttpProcessor.run(Unknown Source)
at java.lang.Thread.run(Thread.java:479)

Any suggestions ? I'm still very new to this....
Sylvia
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, that's because you are using a classes###.zip from old oracle database and try to connect to a newer database. Only thing you need to do is using the newest classes###.zip. That fix the problem.
/Rene
 
Sylvia H Charbonneau
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe I am using the right files. I'm using the classes12.zip file with an Oracle 8.1.7 DB. Those are the one indicated on the Oracle website...
Sylvia
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've googled for you a bit, and the drivers being used seems to be everyone's favourite answer. http://www.orafaq.com/msgboard/java/messages/862.htm

Just for the heck of it, try to comment out the DriverManager.registerDriver() line. This is usually not needed, and may in fact be the line that causes this error.
[ July 16, 2002: Message edited by: Mike Curwen ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic