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

4

9

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.

Immunoreaction answered 15/6, 2011 at 10:55 Comment(0)
L
15

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.

Ludie answered 6/1, 2012 at 14:7 Comment(1)
One easy thing to miss is if there is a mismatch between the word size of the JVM and the library. So if you are running a 32-bit Java and have a 64-bit DLL, then it will not load.Chrysalid
W
4

Apart from putting it into your JRE directly, you can also just specify the java.library.path as such:

-Djava.library.path=C:\jtds-1.3.1-dist\x64\SSO

The above directory would then contain the ntlmauth.dll file

Winger answered 28/6, 2013 at 12:0 Comment(0)
T
0

In addition to DeChrist's response, I had to add the same dll file in the bin folder of C:\Program Files\Java\jdk1.8.0_91\jre\bin also. In that case, it worked for me.

Titled answered 10/11, 2016 at 18:5 Comment(2)
This to me looks more like a comment than a complete answer.Outhouse
I tried to do a comment but I don't have enough reputation yet. As I see, I only can do it in my own answers at the moment.Lobby
F
0

You can solve your problem by adding ntlmauth.dll file at this location C:\Program Files\Java\jre7\bin

Download folder from here Download link

Also Sql get some hints from, C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER02\MSSQL\Log

Folio answered 5/6 at 9:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.