diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java index 6236aa5a8..e327f9651 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java @@ -6831,15 +6831,15 @@ private SqlAuthenticationToken getFedAuthToken(SqlFedAuthInfo fedAuthInfo) throw // Break out of the retry loop in successful case. break; - } catch (DLLException adalException) { + } catch (DLLException dllException) { - // the mssql-jdbc_auth DLL return -1 for errorCategory, if unable to load the - // adalsql DLL - int errorCategory = adalException.getCategory(); + // The mssql-jdbc_auth DLL returns -1 for errorCategory if unable to load the + // mssql-auth.dll + int errorCategory = dllException.getCategory(); if (-1 == errorCategory) { MessageFormat form = new MessageFormat( - SQLServerException.getErrString("R_UnableLoadADALSqlDll")); - Object[] msgArgs = { Integer.toHexString(adalException.getState()) }; + SQLServerException.getErrString("R_UnableLoadMSSQLAuthDll")); + Object[] msgArgs = { Integer.toHexString(dllException.getState()) }; throw new SQLServerException(form.format(msgArgs), null); } @@ -6848,21 +6848,21 @@ private SqlAuthenticationToken getFedAuthToken(SqlFedAuthInfo fedAuthInfo) throw || timerHasExpired(timerExpire) || (fedauthSleepInterval >= millisecondsRemaining)) { - String errorStatus = Integer.toHexString(adalException.getStatus()); + String errorStatus = Integer.toHexString(dllException.getStatus()); if (connectionlogger.isLoggable(Level.FINER)) { connectionlogger.fine( toString() - + " SQLServerConnection.getFedAuthToken.AdalException category:" + + " SQLServerConnection.getFedAuthToken.DLLException category:" + errorCategory + " error: " + errorStatus); } MessageFormat form = new MessageFormat( SQLServerException.getErrString("R_ADALAuthenticationMiddleErrorMessage")); - String errorCode = Integer.toHexString(adalException.getStatus()).toUpperCase(); - Object[] msgArgs1 = { errorCode, adalException.getState() }; + String errorCode = Integer.toHexString(dllException.getStatus()).toUpperCase(); + Object[] msgArgs1 = { errorCode, dllException.getState() }; SQLServerException middleException = new SQLServerException(form.format(msgArgs1), - adalException); + dllException); form = new MessageFormat(SQLServerException.getErrString("R_MSALExecution")); Object[] msgArgs = { user, authenticationString }; diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResource.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResource.java index 41104747b..bfb82417f 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResource.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResource.java @@ -404,7 +404,7 @@ protected Object[][] getContents() { {"R_GenerateSignature", "Unable to generate signature using a specified Azure Key Vault Key URL."}, {"R_SignedHashLengthError", "Signed hash length does not match the RSA key size."}, {"R_InvalidSignatureComputed", "Invalid signature of the encrypted column encryption key computed."}, - {"R_UnableLoadADALSqlDll", "Unable to load adalsql.dll. Error code: 0x{0}. For details, see: http://go.microsoft.com/fwlink/?LinkID=513072"}, + {"R_UnableLoadMSSQLAuthDll", "Unable to load mssql-auth.dll. Error code: 0x{0}. For details, see: http://go.microsoft.com/fwlink/?LinkID=513072"}, {"R_ADALAuthenticationMiddleErrorMessage", "Error code 0x{0}; state {1}."}, {"R_unsupportedDataTypeTVP", "Data type {0} not supported in Table-Valued Parameter."}, {"R_moreDataInRowThanColumnInTVP", "Input array is longer than the number of columns in this table."},