Trying to connect my java web application with MS-SQL server using sqljdbc41
for 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 am trying to insert some values to the database like-
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 each time-
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication
Here are some informations about what i have tried yet-
- i have added the path of
sqljdbc41
in the path variable. - i have added the path of
sqljdbc_auth.dll
in the path variable. - i have added the
sqljdbc41.jar
into myNebeans
project library. - i have added the
sqljdbc_auth.dll
into both bin folder underjdk
andjre
. - my
jdk
is64 bit
under program files folder not in program file(x86). - jdbc driver folder is also in program file directory.
- sql server and sql server browser services are also running.
Edit
Now i experiencing a new thing-after restarting my pc when i deploy the project for the first time then it is working perfectly but when i make any change in my code and re-run the project it's not working!
program files
directory. isn't it windows 64bit folder? – Tripping