• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

invalid driver designator error ..please help

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi sailesh
thankyou very much.
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic