JTDS driver not working for Sql Server 2008R2 and Denali Native SSPI library not loaded. Check the java.library.path system property

Access Denied picture Access Denied · Jun 15, 2011 · Viewed 22.7k times · Source

I am trying to connect Sql Server Data Base using windows authentication from my application using JTDS driver but i got following error

SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.

Following are the scenarios where i tried to resolve but still something is missing..

  1. i have added ntlmauth.dll in system directory and it works fine for Sql server 2005.
  2. But the same thing i tried for Sql Server 2008 R2 and Denali but it gives me the same error as i mentioned above
  3. Also i considered bit i mean i copied ntlmauth.dll from x64\SSO\ path in system directory.

I an confused why this is not working for Sql Server 2008 R2 and Denali.

Answer

DeChrist picture DeChrist · Jan 6, 2012

Try by placing the ntlmauth.dll file in the bin folder of your Java Runtime Environment (e.g. C:\Program Files\Java\jre7\bin).

Be sure to match the "bitness" (32 bit or 64 bit) of the DLL with the JVM bitness.

I ran into the same issue using SQL Server Express 2008 R2 and this MSDN SQL Server Forum Article recommended this resolution, which worked for me.