com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

Published Mar 23 2019 05:03 AM 24.6K Views
Microsoft
First published on MSDN on Jun 18, 2007

On a Windows platform, when trying to connect to SQL Server using Integrated Authentication, you may see this exception:
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
along with the following trace message:
com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll


This generally indicates that the driver can not find the appropriate sqljdbc_auth.dll in the JVM library path.  To correct the problem, please use the java.exe -D option to specify the "java.library.path" system property value.  You will want to specify the full path to the directory contain the sqljdbc_auth.dll.
For example:  java -cp .;"c:\jdbcv1_2\sqljdbc.jar" -Djava.library.path="c:\jdbcv1_2\auth\x86" myApp


Alternatively, you can copy the sqljdbc_auth.dll to a directory in the search path (example: the local directory where you are executing your application).


Note: You may also get the same error message if the application is trying to use the incorrect architecture (x86 VS x64) version of the sqljdbc_auth.dll.  Try specifying the directory path to the other architecture.
If you are on a x64 machine running x64 OS, but the JVM you are using is the x86 version, you will need to specify and use the x86 version of the sqljdbc_auth.dll.


Some related information:
If you get the following exception:
java.lang.UnsatisfiedLinkError: GetDNSName
This typically indicates that the application is trying to use the incorrect version (say v1.0 VS v1.1) of the sqljdbc_auth.dll.  Make sure the application is using the save version of the sqljdbc.jar and sqljdbc_auth.dll files.


Jimmy Wu, SQL Server
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights

Version history
Last update:
‎Mar 23 2019 05:03 AM
Updated by: