Oracle DB URL failure, must have slash [message #651828] |
Tue, 01 February 2011 13:04  |
Eclipse User |
|
|
|
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 #652082 is a reply to message #651829] |
Wed, 02 February 2011 10:56  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.05145 seconds