File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Connection Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connection Problem" Watch "Connection Problem" New topic

Connection Problem

Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Hi all,
I am having a bit of difficulty getting a connection to my database using JDBC. I am using JDeveloper and have managed to create a connection to my database using the connection wizard. However when I attempt to create a connection in my code I get a ClassNotFoundException: oracle.jdbc.driver.OracleDriver
I have installed the classes12.jar in my <JAVA_HOME>\jre\lib\ext directory and can compile my code from the command line.
First question how do I set JDev to point to the SDK I want it to?
Secondly when I try and run the compiled code from the command line I am getting a SQLException: Invalid Oracle URL specified.
I have the following code
PLease can someone tell me where I am going wrong. I know that the database is listening on port 1521 and has a SID of ORA1 so I don't understand why I am receiving a SQLException.

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

You know what, I think you will get a better response in the JDBC forum, so I am going to move this thread there.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Panic over.
I was missing a colon from my URL. It should have been
But if anyone knows the answer to my first question it would be welcome.
I agree. Here's the link:
subject: Connection Problem
jQuery in Action, 3rd edition