Synchrony Failed to Load the sqljdbc_auth.dll Cause no sqljdbc_auth in java.library.path

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When setting Synchrony to use the Windows integrated authentication to the database, Synchrony will try to find the sqljdbc_auth.dll library, but it won't find the file even though the java.library.path is set correctly.

The following appears in the synchrony.log

2018-04-09 15:49:18,549 DEBUG [288:StdErrHandler [C:\Program Files\Atlassian\Confluence\jre\bin\java.exe]] Apr 09, 2018 3:49:18 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
2018-04-09 15:49:18,549 DEBUG [288:StdErrHandler [C:\Program Files\Atlassian\Confluence\jre\bin\java.exe]] WARNING: Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path
2018-04-09 15:57:07,801 DEBUG [289:StdOutHandler [C:\Program Files\Atlassian\Confluence\jre\bin\java.exe]] Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path

Diagnosis

Environment

  • The application is using the Windows integrated authentication to connect to the database.

Diagnostic Steps

  • The administrator has already added the path of the DLL in the <confluence-home>/synchrony-args.properties:

    java.library.path=C:\Microsoft JDBC Driver 6.2 for SQL Server\sqljdbc_6.2\enu\auth\x64

Cause

The issue happens because we need to escape the backslash in the java.library.path added to the synchrony-args.properties file.

Resolution

The resolution is to escape the path using two backslashes. For example, the path mentioned in the diagnosis will look like this:

java.library.path=C:\\Microsoft JDBC Driver 6.2 for SQL Server\\sqljdbc_6.2\\enu\\auth\\x64

Here are the steps to fix it in this case:

  1. Edit the file <confluence-home>/synchrony-args.properties to escape the backslashes from the path as in the example above
  2. Click on Restart Synchrony from the Collaborative Editing management page to load the changes
  3. Repeat the steps on all nodes if running in a clustered environment

Last modified on Apr 20, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.