Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Oracle DB URL failure, must have slash
Oracle DB URL failure, must have slash [message #651828] Tue, 01 February 2011 18:04 Go to next message
David  Balažic is currently offline David Balažic
Messages: 128
Registered: July 2009
Senior Member
Hi!

Using Eclipse J2EE Helios SR-1 I opened the Database Development perspective and created a new database connection.
I selected type Oracle and the Oracle Thin driver version 10 , file ojdbc14.jar.

The problem is that in the general Properties dialog, the username, password, server, ort, SID are entered separated and the program combines them to an URL in the form jdbc:oracle:thin:@servername:1521:SID

And this URL does not work. The error upon connecting is :
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

Using Java code, I can connect if the URL is changed to have a slash between port and SID instead of colon, like this:
DriverManager.getConnection("jdbc:oracle:thin:@servername:1521/SID", "user", "pass");



But in the DB Development wizard (or in the Properties dialog) it is not possible to specify the URL manually.

What to do?
Am I overlooking something?

Regards,
David
Re: Oracle DB URL failure, must have slash [message #651829 is a reply to message #651828] Tue, 01 February 2011 18:05 Go to previous messageGo to next message
David  Balažic is currently offline David Balažic
Messages: 128
Registered: July 2009
Senior Member
Oops, forgot the version infos:

Eclipse Java EE IDE for Web Developers.

Version: Helios Service Release 1
Build id: 20100917-0705


Data Tools Platform Intro 1.8.1.v20100618-26-7w312116392911 org.eclipse.datatools.intro.feature.group
Re: Oracle DB URL failure, must have slash [message #652082 is a reply to message #651829] Wed, 02 February 2011 15:56 Go to previous message
Brian Fitzpatrick is currently offline Brian Fitzpatrick
Messages: 495
Registered: July 2009
Senior Member
You can always use the "Other" driver instead of the "Oracle Thin
Driver" for Oracle 11 and specify a custom URL:

When specifying the driver for Oracle, click the "new" button and look
through the list for the "Other Driver" entry for Oracle 11.

David Balažic wrote:
> Oops, forgot the version infos:
>
> Eclipse Java EE IDE for Web Developers.
>
> Version: Helios Service Release 1
> Build id: 20100917-0705
>
>
> Data Tools Platform Intro 1.8.1.v20100618-26-7w312116392911
> org.eclipse.datatools.intro.feature.group
Previous Topic:Unable to create a new database connection in DSE
Next Topic:60 row max displayed in sql results window
Goto Forum:
  


Current Time: Tue Sep 30 18:07:57 GMT 2014

Powered by FUDForum. Page generated in 0.01720 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software