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
The sqljdbc_auth. dll is within the sqljdbc_x. x folder you install to retrieve the sqljdbcxx. jar file in the auth folder.
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.
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
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 .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With