aspose file tools*
The moose likes JDBC and the fly likes package oracle.jdbc.driver does not exist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "package oracle.jdbc.driver does not exist" Watch "package oracle.jdbc.driver does not exist" New topic
Author

package oracle.jdbc.driver does not exist

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

I'm using jdk1.4
My path is:
set Path=F:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\j2sdk1.4.2_01\bin;F:\oracle\ora92\jdbc\lib\classes12.jar;.;C:\j2sdk1.4.2_01\lib\;F:\oracle\ora92\jdbc\lib\classes12.zip;

import java.sql.*;
class dbAccess {
public static void main (String args []) throws SQLException
{
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc racle:thin:@localhost:1521:nomina", "WEBSPHERE", "WEBSPHERE");
// @machineName ort:SID, userid, password
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
stmt.close();
}
}
==> output:
D:\>javac connjdbc.java
connjdbc.java:5: package oracle.jdbc.driver does not exist
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
^
1 error
Why ?


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
Ravikumar Jambunathan
Ranch Hand

Joined: Aug 25, 2003
Posts: 66
hi max,
try using this url,
("jdbc racle:thin:@<oracle-SID>:1521", "WEBSPHERE", "WEBSPHERE");
or
("jdbc racle ci8:<oracle-SID>", "WEBSPHERE", "WEBSPHERE");
hope this will help you to resolve.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: package oracle.jdbc.driver does not exist