permaculture playing cards
The moose likes JDBC and Relational Databases and the fly likes invalid driver designator error ..please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "invalid driver designator error ..please help" Watch "invalid driver designator error ..please help" New topic

invalid driver designator error ..please help

sai Narayan

Joined: Aug 16, 2004
Posts: 21
when i run my code i get the following error:-
import* ;
import java.sql.*;
import java.util.*;
import oracle.sql.*;
import oracle.jdbc.*;

class javadbconn{

public static void main(String arg[]) throws

Connection connection = null;
try {
// Load the JDBC driver

// 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
} catch (SQLException e) {
// Could not connect to the database


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

at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.oci8.OCIDBAccess.check_error(
at oracle.jdbc.oci8.OCIDBAccess.logon(
at oracle.jdbc.driver.OracleConnection.<init>(

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
at oracle.jdbc.driver.OracleDriver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at javadbconn.main(

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

[ October 13, 2004: Message edited by: sai Narayan ]
[ October 13, 2004: Message edited by: sai Narayan ]
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082

I think is in your classpath

change the line

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


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

It will work and change the @samit to @IP_ADRESS_OF_MACHINE

Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
sai Narayan

Joined: Aug 16, 2004
Posts: 21
hi sailesh
thankyou very much.
I agree. Here's the link:
subject: invalid driver designator error ..please help
It's not a secret anymore!