I don't know what the exact cause is of your bug, but to echo what Scott said:
OracleDriver driver = new OracleDriver(); DriverManager.registerDriver (driver);
This is not the correct way to initialize the JDBC driver. You're not supposed to register the driver yourself with the DriverManager. Instead of the above two lines, you should do something like this:
Originally posted by Paul Clapham: Then presumably you haven't set up your jar file in such a way that the driver is in its classpath. Are you running the jar as an executable jar? If so, what's in the Class-Path entry in its manifest?
I am running the a jar and I think the problem could be the mainfest file, I have listed the ontents of the file, please let me know what I need to add.
Manifest-Version: 1.0 Sealed: true Main-Class: Main