Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/399.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Hibernate sql server express连接错误_Java_Spring_Hibernate_Sql Server 2008 - Fatal编程技术网

Java Hibernate sql server express连接错误

Java Hibernate sql server express连接错误,java,spring,hibernate,sql-server-2008,Java,Spring,Hibernate,Sql Server 2008,正在尝试使用Hibernate将Tomcat上的Java Spring应用程序连接到sqlserver express数据库 获取错误: com.microsoft.sqlserver.jdbc.SQLServerException: Connection Failed TCP / IP to localhost port 1433. Error: "Connection refused: connect. Check the connection properties, make sure t

正在尝试使用Hibernate将Tomcat上的Java Spring应用程序连接到sqlserver express数据库

获取错误:

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

在大多数情况下,是防火墙阻止了它。尝试禁用它

问题是您的tcp/ip协议不是1433,请按照这些说明操作,您的问题应该消失:
SqlServer配置管理器>SqlServer网络配置>SQLEXPRESS协议>右键单击TCP/IP>属性>IP地址>IPALL并将TCP端口更改为1433

您可能从这里得到答案访问我转到启用TCP/IP右侧框,我发现它已启用TCP/IP 1433