Skip to content
Advertisement

Unable to establish JDBC connection to Oracle DBMS in Eclipse

I’m using Oracle 18c Express edition and trying to connect to the same using the below code.

JavaScript

And upon execution, there’s an exception:

JavaScript

I am unable to figure out what’s wrong with the URL. Kindly help resolve this issue. TIA.

Advertisement

Answer

According to Oracle’s documentation the URL should be:

JavaScript

Where user and password can be provided as connection properties:

JavaScript

You probably need to remove the // from the URL as well:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement