I keep on getting this error. I tried one solution from stackoverflow (below) which did not work for me - SQL Exception while connecting to SQL server
I tried allow
To query database SQL Server with JDBC
Firstly, You need to find out the IP of your SQL Server and Enable TCP/IP and set TCP/IP port either. To do that, do these steps:
Open SQL Server Configuration Manager
Choose SQL Server Network Configuration -> Protocols for -> Right click on TCP/IP -> select Enable (if already enabled then move to next step) -> Right click to TCP/IP again -> Properties -> Choose tab IP Address -> In IPAll group: Clear value of TCP Dynamic Ports and set 1433 to TCP Port -> Click OK
Note: Copy one of the IPs in the Properties table to do config later
Double click to SQL Server Services - > Right click to SQL Server (USER) ** -> Choose **Restart
Now, you already have the IP, config server as below:
Note: Remove destroy-method="close" out of the bean