2016-02-09 88 views
1

尝试将Tomcat上的Java Spring应用程序连接到使用Hibernate的我的sqlserver express数据库。Java Hibernate sql server快速连接错误

四处错误:

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. ". 
+0

可能会从此处获得答案访问http://stackoverflow.com/questions/18841744/jdbc-connection-failed-error-tcp-ip-连接到主机失败 –

+0

我去启用TCP/IP权利框,我发现它已经启用TCP/IP 1433 –

回答

1

的问题是,你的TCP/IP协议不是1433,请按照论文的指示,你的问题应该消失: SqlServer的配置管理器> SQL Server网络配置> SQLEXPRESS的协议>右键单击TCP/IP>属性> IP地址> IPALL并将TCP端口更改为1433

0
在大多数情况下,它的防火墙阻止它

。尝试禁用它