Protocol violation error
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   rajeev_ayyar
Posted On:   Wednesday, March 21, 2001 01:06 PM

Iam trying to connect to a oracle database from a standalone java application using jdbc. I get a protocol violation error when it executes the 'DriverManager.getConnection' command. Following is the sample code. Any help will in this regard will be appreciated. public void dbConnection() { System.out.println("Trying connection"); try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); } catch(SQLException ex) { System.out.println("Error in Connecting to the Database1 "+ex.toString()); } try { String l_dbConnectString = "(DESCRIPTION=(ADDRESS=(HOST="+"99.99.99.99"+")"+ "(PROT   More>>

Iam trying to connect to a oracle database from a standalone java application using jdbc. I get a protocol violation error when it executes the 'DriverManager.getConnection' command.

Following is the sample code. Any help will in this regard will be appreciated.

public void dbConnection() {
System.out.println("Trying connection");
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
}
catch(SQLException ex) {
System.out.println("Error in Connecting to the Database1 "+ex.toString());
}

try {
String l_dbConnectString =
"(DESCRIPTION=(ADDRESS=(HOST="+"99.99.99.99"+")"+
"(PROTOCOL=tcp)(PORT="+"1521"+"))"+
"(CONNECT_DATA=(SID="+"dbname"+")))";

m_connection = DriverManager.getConnection(
"jdbc:oracle:thin:@"+l_dbConnectString,
"dbuser", "dbpassword");
}
catch(SQLException ex) {
System.out.println("Error in Connecting to the Database "+ex.toString());
}
}

   <<Less

Re: Protocol violation error

Posted By:   Ajit_Bhingarkar  
Posted On:   Tuesday, October 9, 2001 03:33 PM

Pls. download latest Oracle JDBC driver (classes12.zip) from
http://technet.oracle.com/software/tech/java/sqlj_jdbc/content.html
and try again.

The protocol violation error indicates that either JDBC driver is
incompatible with Oracle Database or is corrupt.
About | Sitemap | Contact