当前位置: 代码迷 >> Sql Server >> [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.解决方法
  详细解决方案

[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.解决方法

热度:106   发布时间:2016-04-27 14:33:47.0
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

Java code
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)    at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)    at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)    at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)    at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)    at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)    at java.sql.DriverManager.getConnection(DriverManager.java:582)    at java.sql.DriverManager.getConnection(DriverManager.java:185)    at org.gl.DBToolsX.getConnection(DBToolsX.java:16)    at org.gl.Login.service(Login.java:32)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)    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:233)    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)    at java.lang.Thread.run(Thread.java:619)2011-12-17 14:55:16 org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for servlet login threw exceptionjava.lang.NullPointerException    at org.gl.Login.service(Login.java:36)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)    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:233)    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)    at java.lang.Thread.run(Thread.java:619)



已经安装了SP4补丁了,查询分析器版本8.00.2039

操作系统 XP 2002版本 SP3



------解决方案--------------------

查下端口
http://wenku.baidu.com/view/b63bd2270722192e4536f628.html


------解决方案--------------------
SQL2000:

String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver"; // 加载JDBC驱动

String dbURL = "jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=lianxi"; // 连接服务器和数据库
  相关解决方案