SQLException: this driver is not configured for integrated authentication tomcat

后端 未结 2 1231
执笔经年
执笔经年 2020-12-07 02:05

Am trying to connect MS SQL server through java web applications.

Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");

connection= DriverManager         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-07 02:45

    sqljdbc_auth.dll is need to use windows authentication or Kerberos authentication.

    Get the dll from Microsoft and install it either by:

    1. drop on application library folder
    2. drop on the java bin folder.

      Not recommended if you want to package the applications with all the dependencies. Also, it requires to find what java version is being used and from what path.

    3. drop the library on some folder and then add the path in the command line:

      java -Djava.library.path=...
      

    The mssql-jdbc driver and the sqljdbc_auth.dll should be:

    • on the same folder
    • both from the same version
    • for the same architecture (x86/x64) JVM is running.

    Check also the jdbc comparability matrix with java versions.

提交回复
热议问题