WA Agent DB job fails with Failed to load MSAL4J Java library for performing ActiveDirectoryPassword authentication.
search cancel

WA Agent DB job fails with Failed to load MSAL4J Java library for performing ActiveDirectoryPassword authentication.

book

Article ID: 409382

calendar_today

Updated On:

Products

ESP dSeries Workload Automation ESP dSeries Workload Automation - Business Agents (dSeries) ESP dSeries Workload Automation - System Agent (dSeries) Workload Automation Agent ESP dSeries Workload Automation - Scheduler (dSeries)

Issue/Introduction

User is running a DB job and it is failing with:

suberror "com.microsoft.sqlserver.jdbc.SQLServerException: Failed to load MSAL4J Java library for performing ActiveDirectoryPassword authentication.".
......
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:7423)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:5921)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$300(SQLServerConnection.java:95)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:5853)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7825)

 

 

Environment

Workload Automation Agent for Database: 12.0 or above

Database: MS-SQL 

Cause

The SQL Server may be configured to use Azure AD for Authentication.  This requires the JDBC to use Microsoft Authentication Library for Java (MSAL4J).

Resolution

Download the following libraries from the Maven.

msal4j
azure-json

In the above links, click on the version.  It will direct to another link where actual jar is by Files section.  The versions will change in future as MS develops new build and uploads to Maven.

Add the jars the <agent_install>/jars/ext directory.  Restart the WA Agent for changes to take effect.