3

I am constantly getting error Failed to load the sqljdbc_auth.dll even though I have specified on project - Properties - Run this VM options: -Djava.library.path="C:\Program Files\Microsoft JDBC Driver 4.1 for SQL Server\sqljdbc_4.1\enu\auth\x86" That is the exact location where the dll exists.

enter image description here

Full error: Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path

What have I done wrong here?

PS. I have read all other questions around about this error, but most of them didn't included that line in the project - Properties.

2 Answers2

0

Is the dll really located at -Djava.library.path="C:\Program Files\Microsoft JDBC Driver 4.1 for SQL Server\sqljdbc_4.1\enu\auth\x86" ?

Try also forward-slashes -Djava.library.path="C:/Program Files/Microsoft JDBC Driver 4.1 for SQL Server/sqljdbc_4.1/enu/auth/x86"

Ben
  • 2,235
  • 18
  • 17
0

I've had a similar issue. Make sure you have both enu\auth\x86 and enu\auth\x64 as Jeroen alludes to above. I've also had one case where I had to add sqljdbca_auth.dll to \Windows\SysWOW64