Reputation: 591
I'm using eclipse and want to make an sql database connection I put the sqljdbc_auth.dll in the buildpath
I'm getting this error message
Dec 18, 2013 10:45:54 AM com.microsoft.sqlserver.jdbc.AuthenticationJNI clinit>
WARNING: Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path
This driver is not configured for integrated authentication. ClientConnectionId:7a06f...
What am I doing wrong here?
Upvotes: 4
Views: 17788
Reputation: 184
If the JDBC is still using 32 bit sqljdbc_auth.dll, it could be because the PATH variable has found 64 bit dll before it gets to the newly added PATH environment variable. Add location of the 64 bit sqljdbc_auth.dll in the very beginning of the PATH system variable. In my case it was
C:\nilster\JDBC\sqlserver-sqljdbc_4.2\enu\auth\x64
This helped me get around to the issue.
Upvotes: 0
Reputation: 591
I solved the problem.
-Djava.library.path=C:\bla\path\where\the\dll\is
just needed quotes around it like this
"-Djava.library.path=C:\Program Files (x86)\jdbc\sqljdbc_4.0\enu\auth\x86"
Upvotes: 2
Reputation: 13857
The DLL file has to be present in one of the locations of your PATH
environment var.
It may already help to copy the file to the folder windows\system32
or the bin
folder of your JRE/JDK. Restart Eclipse and try again.
If this doesn't work you can also specify the parameter java.library.path
in your Eclipse Run Configuration
like this:
-Djava.library.path=C:\bla\path\where\the\dll\is
Alternativly you can follow this answer which describes in detail how to setup the parameter for a complete project.
See also:
Upvotes: 4