Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no sqljdbc_auth in java.library.path

I have a Java EE Web Application which connects to a SQL Server 2008 instance. I don't have any problem connecting and retrieving to all my tables, except for one of them. The error in the Tomcat log is:

WARNING: Failed to load the sqljdbc_auth.dll cause :- no sqljdbc_auth in java.library.path

like image 613
AFF Avatar asked Jul 29 '12 06:07

AFF


People also ask

Where is Sqljdbc_auth DLL located?

The sqljdbc_auth. dll is within the sqljdbc_x. x folder you install to retrieve the sqljdbcxx. jar file in the auth folder.

What is Java library path?

java. library. path is a System property, which is used by Java programming language, mostly JVM, to search native libraries, required by a project. Similar to PATH and Classpath environment variable, java.


2 Answers

1) Download the JDBC Driver here.


2) unzip the file and go to sqljdbc_version\fra\auth\x86 or \x64
3) copy the sqljdbc_auth.dll to C:\Program Files\Java\jre_Version\bin
4) Finally restart eclipse

like image 128
Amine Soumiaa Avatar answered Oct 08 '22 10:10

Amine Soumiaa


Here are the steps if you want to do this from Eclipse :

1) Create a folder 'sqlauth' in your C: drive, and copy the dll file sqljdbc_auth.dll to the folder

1) Go to Run> Run Configurations

2) Choose the 'Arguments' tab for your class

3) Add the below code in VM arguments:

-Djava.library.path="C:\\sqlauth" 

4) Hit 'Apply' and click 'Run'

Feel free to try other methods .

like image 33
nanospeck Avatar answered Oct 08 '22 10:10

nanospeck