aspose file tools*
The moose likes Tomcat and the fly likes Protocol Violation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Protocol Violation" Watch "Protocol Violation" New topic
Author

Protocol Violation

Sylvia H Charbonneau
Ranch Hand

Joined: Jul 11, 2002
Posts: 37
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

Joined: Oct 12, 2001
Posts: 1179

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


Regards, Rene Larsen
Dropbox Invite
Sylvia H Charbonneau
Ranch Hand

Joined: Jul 11, 2002
Posts: 37
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

Joined: Feb 20, 2001
Posts: 3695

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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Protocol Violation