File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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
Bookmark "Connection Problem" Watch "Connection Problem" New topic
Author

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.

Regards
Nigel
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
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.
regards
Nigel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Problem