Synchrony Failed to Load the sqljdbc_auth.dll Cause no sqljdbc_auth in java.library.path
プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。
問題
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
診断
環境
- The application is using the Windows integrated authentication to connect to the database.
診断ステップ
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
原因
The issue happens because we need to escape the backslash in the java.library.path added to the synchrony-args.properties file.
ソリューション
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
- Just update the <confluence-home>/synchrony-args.properties file to escape the backslashes from the path and restart the application.