This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

invalid driver designator error ..please help

 
sai Narayan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i run my code i get the following error:-
code:-
import java.io.* ;
import java.sql.*;
import java.util.*;
import oracle.sql.*;
import oracle.jdbc.*;



class javadbconn{


public static void main(String arg[]) throws java.io.IOException
{

Connection connection = null;
try {
// Load the JDBC driver
Class.forName("oracle.jdbc.driver.OracleDriver");

// Create a connection to the database
connection =

DriverManager.getConnection("jdbc : oracle : oci8:@samit:1521:asid","scott","tiger");


} catch (ClassNotFoundException e) {
// Could not find the database driver
e.printStackTrace();
} catch (SQLException e) {
// Could not connect to the database
e.printStackTrace();

}
}
}

error:-
java.sql.SQLException: ORA-06401: NETCMN: invalid driver designator

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:184)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1774)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:462)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:353)

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:457)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:332)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at javadbconn.main(javadbconn.java:32)

the client side oracle version is as follows:-
Oracle9i Enterprise Edition Release 9.0.1.5.1 - Production
With the Partitioning option
JServer Release 9.0.1.4.0 - Production


[ October 13, 2004: Message edited by: sai Narayan ]
[ October 13, 2004: Message edited by: sai Narayan ]
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think classes12.zip is in your classpath

change the line

DriverManager.getConnection("jdbc racle ci8:@samit:1521:asid","scott","tiger");

to

DriverManager.getConnection("jdbc : oracle : thin:@samit:1521:asid","scott","tiger");

It will work and change the @samit to @IP_ADRESS_OF_MACHINE
 
sai Narayan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi sailesh
thankyou very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic