本人小白 遇见的问题 请各位大神帮忙
com.microsoft.sqlserver.jdbc.SQLServerException: 到主机 localhost 上的命名实例 sqlexpress 的连接失败。错误:“java.net.SocketTimeoutException: Receive timed out”。请验证服务器和实例名称,并检查防火墙没有阻止到端口 1434 的 UDP 通信,而且对于 SQL Server 2005 或更高版本,还要验证 SQL Server Browser 服务正在主机上运行。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.getInstancePort(SQLServerConnection.java:3163)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.primaryPermissionCheck(SQLServerConnection.java:953)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:816)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at ManagerDAL.DBHelper.<init>(DBHelper.java:33)
at ManagerDAL.StudentsDAL.getList(StudentsDAL.java:15)
at ManagerBLL.StudentsBLL.loginCheck(StudentsBLL.java:17)
at org.apache.jsp.DOACTION.DoLogin_jsp._jspService(DoLogin_jsp.java:70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
------解决方案--------------------
SQL Server Browser 服务 没有启动吧?
------解决方案--------------------
请求超时。
1.网络问题。
2.检查端口号和URL。
3.检查服务是否启动。
------解决方案--------------------
到你的sql server配置管理器里面看你的sql server网络配置->MSSQLSERVER的协议->TCP/IP里面的ip和端口是否启用是否和你的连接一致