This driver is not configured for integrated authentication

Attempting to connect my Java application to an MS-SQL server using sqljdbc41for jdk 1.8. Here is the database connection code -

    Connection connection;
    String url = "jdbc:sqlserver://localhost:1433;databaseName=Lista;integratedSecurity=true";
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    connection = DriverManager.getConnection(url);

when I try to insert some values ​​into the database, for example -

    PreparedStatement ps = connection.prepareStatement("INSERT INTO user_informations VALUES(?,?,?)");

    ps.setString(1, "value");
    ps.setString(2, "value");
    ps.setString(3, "value");

    ps.executeUpdate();

getting the following error every time -

com.microsoft.sqlserver.jdbc.SQLServerException: this driver is not configured for integrated authentication

Here is some information about what I have tried yet -

  • I added the path to sqljdbc41in the path variable.
  • I added the path to the variable sqljdbc_auth.dllin the path variable.
  • I have added sqljdbc41.jarto my project library Nebeans.
  • I added sqljdbc_auth.dllto the bin folder in jdkand jre.
  • my jdk 64 bit (x86).
  • jdbc .
  • SQL Server SQL Server .

Edit

- , , , , !

+4
2

!

( ), , glassfish sqljdbc42.jar. sqljdbc42.jar glassfish -

glassfish-4.1\glassfish\domains\domain1\lib

.

!

+3

, 2 java, , 64-, oracle jdeveoper ( , ) 32-. dll java, , .

0

Source: https://habr.com/ru/post/1607055/


All Articles