Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection Error: Only when using AD Password Mode #215

Open
dinobm opened this issue Feb 27, 2023 · 4 comments
Open

Connection Error: Only when using AD Password Mode #215

dinobm opened this issue Feb 27, 2023 · 4 comments

Comments

@dinobm
Copy link

dinobm commented Feb 27, 2023

I am getting the following error while using the Spark Connector with the AD Password

value = OUTPUT_CONVERTER[type](answer[2:], gateway_client)
325 if answer[1] == REFERENCE_TYPE:
--> 326 raise Py4JJavaError(
327 "An error occurred while calling {0}{1}{2}.\n".
328 format(target_id, ".", name), value)

Py4JJavaError: An error occurred while calling o2282.load.
: java.lang.NoClassDefFoundError: com/nimbusds/oauth2/sdk/auth/ClientAuthentication

I have tried the connector with the SQL Auth (UID, Password, also with the Service Principal and Token they both work. So i am not sure, if this is because of the missing assembly referenced here(#26)

The code is being run from a Synapse Notebook. Any Ideas?

@luxu1-ms
Copy link
Collaborator

luxu1-ms commented Mar 6, 2023

Could you share the repro?

@dinobm
Copy link
Author

dinobm commented Mar 6, 2023

Here is a Snapshot of the code we use. This is used in a notebook (Synpase) agains the default Spark Cluster running Spark 3.2. The connector works if i use SQL Auth or the Service Principal/Token. Note the Sevrer is a Synapse Endpoint.

jdbc_df = spark.read.format("com.microsoft.sqlserver.jdbc.spark").option("url", "jdbc:sqlserver://Z-ondemand.sql.azuresynapse.net") \
.option("dbtable", "dbo.MyTable").option("authentication", "ActiveDirectoryPassword") \
.option("user","a@test.com").option("password", "XXXXXXXXXXXX").option("encrypt", "true")\
.option("hostNameInCertificate", "*.database.windows.net")\
.option("driver", "com.microsoft.sqlserver.jdbc.SQLServerDriver")\
.load()

@luxu1-ms
Copy link
Collaborator

luxu1-ms commented Mar 6, 2023

I am not sure where the issue is from. Maybe check this and contact Synapse support.

@dinobm
Copy link
Author

dinobm commented Mar 6, 2023

I have also reported this to the MS Q&A Forums. But the error seems to be in the Connector than with Synapse by itself. I wonder if anyone else has used AD/password approach at all. Anyways, i will post any update/solution i stumble upon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants