spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mich Talebzadeh <>
Subject Connecting to Oracle Autonomous Data warehouse (ADW) from Spark via JDBC
Date Wed, 26 Aug 2020 18:58:47 GMT

The connection from Spark to Oracle 12c etc are well established using

I am attempting to connect to Oracle Autonomous Data warehouse (ADW)

*Oracle Database 19c Enterprise Edition Release*

Oracle document suggest using ojdbc8.jar to connect to the database with
the following URL format using Oracle Wallet


This works fine through JAVA itself but throws an error with Spark version

The connection string is defined as follows

val url = "jdbc:oracle:thin:@mydb_high

where DBAcess directory is the unzipped wallet for as
created by ADW connection.

The thing is that this works through normal connection via java code.using
the same URL

So the question is whether there is a dependency in Spark JDBC connection
to the ojdbc.

The error I am getting is:

java.sql.SQLRecoverableException: IO Error: Invalid connection string
format, a valid format is: "host:port:sid"
        at oracle.jdbc.driver.T4CConnection.logon(
        at oracle.jdbc.driver.T4CConnection.<init>(
        at oracle.jdbc.driver.OracleDriver.connect(
        at java.sql.DriverManager.getConnection(

This Oracle doc
explains the connectivity.

The unzipped wallet has the followiing files

 ls DBAccess/
README  cwallet.sso  ewallet.p12  keystore.jks
sqlnet.ora  tnsnames.ora  truststore.jks



LinkedIn *

*Disclaimer:* Use it at your own risk. Any and all responsibility for any
loss, damage or destruction of data or any other property which may arise
from relying on this email's technical content is explicitly disclaimed.
The author will in no case be liable for any monetary damages arising from
such loss, damage or destruction.

View raw message