Connecting to Azure Data Explorer with JDBC

Machiri Marodi 0 Reputation points
2024-02-29T08:05:32.5666667+00:00

I am trying to connect to Azure Data Explorer with JDBC using MATLAB but I keep running into the error shown in the insert below. A little bit of googling revealed that this issue could potentially be resolved by "opening port 443 and the necessary endpoints to obtain the Azure Active Directory token" (Execution of class com.microsoft.aad.adal4j.AcquireTokenCallable failed), Port 443 is open and the mssql-jdbc (7.0.0-jre8) and adal4j (1.6.3) jar files, and all of their dependencies have been downloaded and added to dynamic java path. Does anyone have any idea what could be causing this error?

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
501 questions
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 84,051 Reputation points Microsoft Employee
    2024-03-01T04:50:25.6633333+00:00

    @Machiri Marodi - Thanks for the question and using MS Q&A platform.

    Based on the error message you provided, it seems like you have already taken some steps to resolve the issue by opening port 443 and downloading the necessary jar files. However, there could be other reasons why you are still encountering this error.

    Here are a few things you could try to troubleshoot the issue:

    • Double-check that you have correctly configured the connection string for Azure Data Explorer in your MATLAB code. Make sure that you have specified the correct server name, database name, and authentication details.
    • Check that you have the correct version of the mssql-jdbc jar file. You can try downloading the latest version from the official Microsoft website.
    • Make sure that you have the correct version of the adal4j jar file. You can try downloading the latest version from the official GitHub repository.
    • Check that you have the necessary permissions to access Azure Data Explorer. You may need to check with your Azure administrator to ensure that you have the correct permissions.
    • Try running your MATLAB code on a different machine to see if the issue persists. This could help you determine if the issue is specific to your current environment.

    If none of these steps resolve the issue, it may be helpful to provide more information about the error message you are seeing, such as the full stack trace. This could help identify the root cause of the issue.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.