Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connect oracle type 4 driver in eclipse

 
mohamed mustaq
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15284
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not be loading the driver using this line:

Use this instead:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic