I am trying to connect to my SQL Server 2008 database from Java and I\'m having the same problem from this thread.
String userName = \"xxxx\";
String password =
For me, it worked once I changed
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
to:
in POM
com.microsoft.sqlserver
mssql-jdbc
6.1.0.jre8
and then:
import com.microsoft.sqlserver.jdbc.SQLServerDriver;
...
DriverManager.registerDriver(SQLServerDriver());
Connection connection = DriverManager.getConnection(connectionUrl);