Eclipse Version: Neon.3 Release (4.6.3)
On New Database Connection Profile/Wizard, I select Oracle as Database Type add ojdbc 8 jar and enter requested details for Oracle instance running on remote server.
I enter server, port and service values as I enter in SQL Developer (where I am able to connect), but connection test never succeed from Eclipse.
Once values are entered it constructs JDBC URL (which is not editable) in below format: jdbc:oracle:thin:@server:port:service
Error message: 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
Though I wanted to directly provide jdbc URL "Connection URL" field is not editable.
CodePudding user response:
After some more digging found it in one of Eclipse bug reports. Thanks to Mike Hatherly for workaround, reference: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382063#c3
Work around provided by Mike Hatherly: "I have found a workaround. If you export the Database connection details, you can then manually edit the property org.eclipse.datatools.connectivity.db.URL to include the missing '/'s, then re-import and overwrite the current connection. Doing this however shows the connection properties in Eclipse as missing values, although the connection works correctly."
So before exporting you would 've saved connection profile with password and everything and Export un-encrypted. And the correct URL format when using ServiceName: jdbc:oracle:thin:@//server:port/ServiceName