1

Trying to connect my Java Spring app on Tomcat to my sqlserver express database with Hibernate.

Getting error:

com.microsoft.sqlserver.jdbc.SQLServerException: Connection Failed TCP / IP to localhost port 1433.
Error: "Connection refused: connect. Check the connection properties, make
sure that an instance of SQL Server is running on the host and accepting TCP
/ IP connections to port, and make sure that no firewall is blocking TCP 
connections to port. ".
Nabil Harboul
  • 50
  • 1
  • 7

2 Answers2

1

the problem is that your tcp/ip protocol is not 1433, please follow theses instructions and your problem should be gone : SqlServer Configuration Manager > Sql server Network configurations > protocols for SQLEXPRESS > right click on TCP/IP > properties > IP Adress > IPALL and change TCP PORT to 1433

Hamza Toussi
  • 108
  • 10
0

in majority of cases its the firewall that blocks it. try disabling it

Zubair Nabi
  • 1,016
  • 7
  • 28