• Post Reply Bookmark Topic Watch Topic
  • New Topic

Connection Problem  RSS feed

 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!