dll missing in JDBC

后端 未结 9 909
Happy的楠姐
Happy的楠姐 2020-11-29 07:15

I am currently working with SQL in Java. Recently I got this error:

com.microsoft.sqlserver.jdbc.AuthenticationJNI 
WARNING: Failed to load the         


        
相关标签:
9条回答
  • 2020-11-29 07:54

    Set java.library.path to a directory containing this DLL which Java uses to find native libraries. Specify -D switch on the command line

    java -Djava.library.path=C:\Java\native\libs YourProgram

    C:\Java\native\libs should contain sqljdbc_auth.dll

    Look at this SO post if you are using Eclipse or at this blog if you want to set programatically.

    0 讨论(0)
  • 2020-11-29 07:59

    keep sqljdbc_auth.dll in your windows/system32 folder and it will work.Download sqljdbc driver from this link Unzip it and you will find sqljdbc_auth.dll.Now keep the sqljdbc_auth.dll inside system32 folder and run your program

    0 讨论(0)
  • 2020-11-29 07:59

    Alright guys, I found it out! I didn't really need to change the java.library.path but the "Native library location" of sqljdbc.jar

    This is the best answer I could find: https://stackoverflow.com/a/958074/2000342

    It works now, thanks for the support!

    0 讨论(0)
  • 2020-11-29 07:59

    If its the case of the dll file missing you can download the dll file from this link http://en.osdn.jp/projects/sfnet_dose-grok/downloads/sqljdbc_auth.dll/

    else you need to provide the username and password of the db you are trying to connect, and make the authentication as false

    0 讨论(0)
  • 2020-11-29 08:03

    Friends I had the same problem because of the different bit version Make sure following point * Your jdk bit 64 or 32 * Your Path for sqljdbc_4.0\enu\auth\x64 or x86 this directory depend on your jdk bit * sqljdbc_auth.dll select this file based on your bit x64 or x86 and put this in system32 folder and it will works for me

    0 讨论(0)
  • 2020-11-29 08:04

    The sqljdbc_auth.dll is within the sqljdbc_x.x folder you install to retrieve the sqljdbcxx.jar file in the auth folder. Create a lib folder at the base of your scala project and move sqljdbc_auth.dll into this folder. This makes sure that you are getting the correct file, e.g. 64 bit or 32 bit that matches your sqljdbcxx.jar file.

    0 讨论(0)
提交回复
热议问题