It's not a secret anymore!*
The moose likes JDBC and the fly likes connect oracle type 4 driver in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connect oracle type 4 driver in eclipse" Watch "connect oracle type 4 driver in eclipse" New topic
Author

connect oracle type 4 driver in eclipse

mohamed mustaq
Greenhorn

Joined: Dec 19, 2005
Posts: 21
HI,
I Have a problem with connecting oracle type driver in eclipse.
when i give the connection as
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection c;
c=DriverManager.getConnection("jdbc racle:thin:@localhost:1521 rcl","mustaq","mus");

it display the error as follows
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The type OracleDriver must implement the inherited abstract method Driver.connect(String, Properties)

at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:5)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at chan.main(chan.java:11)
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

You should not be loading the driver using this line:

Use this instead:


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connect oracle type 4 driver in eclipse
 
Similar Threads
Oracle JDBC unable to get connection
java.lang.ClassCastException error
Bitmechanic connection pool not working ?
Connection pooling with DBCP
DB2 :No suitable driver