Cognos Analytics

 View Only
Expand all | Collapse all

Azure SQL Server Connection issue with JDBC

  • 1.  Azure SQL Server Connection issue with JDBC

    Posted Fri February 26, 2021 08:38 AM
    Hi All,

    Has anyone tried setting up connection to Azure SQL Server using JDBC please?
    I have 11.1.1 and 11.1.7 and both version producing same errors as below. 

    XQE-DS-0006 Unable to logon to the data source.
    Failed to authenticate the user (xxxxx) in Active Directory (Authentication=ActiveDirectoryPassword).
    java.lang.RuntimeException: java.net.SocketException: Unexpected end of file from server
    java.net.SocketException: Unexpected end of file from server

    I tested in Java code on its own and also in DBeaver which use JDBC driver. Both methods worked fine and connected to Azure SQL Server.
    Because it is authenticating using Azure Active Directory, I need to place msal4j-1.9.0.jar file and its dependencies .jar files (10 of them) under "Driver" folder.
    And auth.dll file under bin and bin64. I can connect fine to On prem SQL Server which authenticated against on Prem AD.

    Below is a list of .jar files i used and not sure what else I'm missing here. Any help will be appreciated.
    Note > I also tried with adal4j which is now deprecated and it dependencies and it didn't work.

    Jar File Name Location
    content-type-2.1.jar Driver
    jackson-annotations-2.10.1.jar Driver
    jackson-core-2.10.1.jar Driver
    jackson-databind-2.10.1.jar Driver
    jcip-annotations-1.0-1.jar Driver
    json-smart-1.3.1.jar Driver
    lang-tag-1.4.4.jar Driver
    msal4j-1.9.0.jar Driver
    mssql-jdbc-9.2.0.jre8.jar Driver
    mssql-jdbc_auth-9.2.0.x64.dll Bin and Bin64
    nimbus-jose-jwt-8.18.jar Driver
    oauth2-oidc-sdk-8.23.1.jar Driver
    slf4j-api-1.7.28.jar Driver

    Many Thanks,

    Lyn

    ------------------------------
    Lyn
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Azure SQL Server Connection issue with JDBC

    Posted Thu April 01, 2021 04:14 PM
    Hi Lyn
    Please let me know if you have got any solution to resolve the issue, we are facing the same issue. 
    Thanks

    ------------------------------
    Premkumar Shanmugasundaram
    ------------------------------