晓风残月
新手上路
posts - 6,comments - 49,trackbacks - 0

使用MS Sql2000 for JDBC SP3连接MS Sql2000出现如下错误:

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(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at drawServlet.doGet(drawServlet.java:
50 )
    at drawServlet.doPost(drawServlet.java:
18 )
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:
709 )
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:
802 )
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
237 )
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
157 )
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
214 )
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104 )
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520 )
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:
198 )
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
152 )
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104 )
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520 )
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
137 )
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104 )
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
118 )
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
102 )
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520 )
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109 )
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104 )
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520 )
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:
929 )
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
160 )
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
799 )
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:
705 )
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
577 )
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:
683 )
    at java.lang.Thread.run(Unknown Source)
java.sql.SQLException: 
[ Microsoft ][ SQLServer 2000 Driver for JDBC ] End of stream was detected on a read.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(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(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at drawServlet.doGet(drawServlet.java:
92 )
    at drawServlet.doPost(drawServlet.java:
18 )
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:
709 )
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:
802 )
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
237 )
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
157 )
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
214 )
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104 )
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520 )
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:
198 )
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
152 )
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104 )
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520 )
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
137 )
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104 )
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
118 )
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
102 )
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520 )
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109 )
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:
104 )
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520 )
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:
929 )
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:
160 )
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
799 )
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:
705 )
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
577 )
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:
683 )
    at java.lang.Thread.run(Unknown Source)

原因:由于开发环境是Win 2003 Server,故SQL 2000需要补丁包,不然在2k3下,SQL默认关闭了TCP连接
解决:打上SQL serverSP4 就OK了 
posted on 2006-06-10 15:35 jinglecat 阅读(22192) 评论(41)  编辑  收藏 所属分类: Java Prime

FeedBack:
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2006-10-26 09:04 | cenqin
我已经打上了sp4包还是错误。
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:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at org.apache.jsp.chap3_002d1_jsp._jspService(org.apache.jsp.chap3_002d1_jsp:63)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
请高手指点,谢谢  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2006-10-27 16:04 | jinglecat
@cenqin
也许你应该确认你的连接字符串是否正确。
我确实是通过打上SP4,解决了此问题。
PS:我只是个Java新手,到CSDN的Java社区看看或许有其他网友有类似问题。
  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2006-10-27 16:41 | jinglecat
@cenqin
不知道你装的什么系统,打上
Microsoft SQL Server 2000 Driver for JDBC Service Pack 3
试试
http://www.microsoft.com/sql/downloads上有得下  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2007-07-25 00:09 | 呵呵
我用的是XP系统,也出现了和上面一样的错误啊,

应该怎么解决?  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2007-07-25 18:23 | jinglecat
@呵呵
装 SQL Server sp4 看看  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2007-09-15 23:35 | lean
我也遇到类似的问题了
而且SQL2000补丁SP4也打了
哪位高手能帮忙解决
我的E-Mail :jolin86967@163.com  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2007-09-26 00:25 | yuan
我也是遇到这样的问题,我也按照大家说的方法去做了,可问题还是得不到解决也,急请高手帮忙解决下哈~~~~~~~~~~~~~~~  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2007-09-28 09:26 | QQ47399056
换mysql吧  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2007-10-09 11:43 | 逍遥
把SQL登陆模式改为混合登陆模式就好了。呵呵!
QQ:80764911  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2007-10-31 14:51 | quweihua
[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(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:63)
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(Unknown Source)
2007-10-31 14:39:43 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
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(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:63)
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(Unknown Source)
我用的是Xp系统,装的sqlserver personal个人版的  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2008-05-06 10:33 | lizhaofeng
我用的是eclipse
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(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
请那位大侠帮我解决一下,谢谢
我的E-mail 是xiaozhao1795@163.com  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2008-05-18 13:38 | jeremy
就没个高手出来解决下?在网上溜达了1个月了,这个问题的帖子几乎都是没有解决方案的哦·······················  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2008-05-23 13:59 | w9413
哎,我也是这样的错误,N天了,什么SP3,我连SP4的补丁都打上去了,更奇怪的有的时候可以连上,在公司连上就没问题,回家之后,无论怎么连,怎么改都不行,第二天一来公司,很正常.我斗郁闷的很,也不知道问题出在哪的,现在连本地的怎么连都连不上,通过IP地址连到别人的数据库很正常,查询分析器可以查出来.哭都哭不好!
有谁赶快解决啊 ,多谢多谢! 有谁解决好了,加我QQ65369534,告诉我一下什么问题,谢谢了 .  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2008-07-22 19:25 | sssss
@jinglecat
我有个办法,不用架包能连的,
new sun.jdbc.odbc.JdbcOdbcDriver();
Connection=java.sql.DriverManager.getConnection("jdbc:odbc:Driver={sql server};server=.;database=数据库名);  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2008-07-28 16:08 | yumen
关注中~~  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2008-08-01 17:34 | werw
@sssss
werw  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2008-08-01 17:44 | werwtryrty
@sssss
tryrty  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2008-08-04 14:01 | 郁闷啊
我也是。。。。怎么办呢,都打了SP4补丁了,而且也设置了环境变量了,发布到tomcat下了,还是不行啊  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2008-08-04 14:02 | 郁闷啊
哪个高手指导下啊!感激不尽,我的邮箱wanfeng20088@163.com  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2008-09-02 10:43 | feng
我页遇到这个问题,哪个高手能给讲下为什么会出现这个异常。我的XP系统,验证模式时混合的,用查询分析器也能进入,我还是自己建的数据库。自己创建的登陆用户。就时出现那个异常怎么弄页弄不好,希望高手给指点下。oyxl520@163.com
QQ:414362883  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2009-02-04 20:09 | 哭了
我也打了sp4了 而且是混合模式 可还是
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(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)

哭死了  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2009-02-04 20:12 | 哭了
我的密码设为空了 这不是问题吧
求助高手啊
我的 email是liang_aijing@yeah.net  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2009-02-25 17:27 | 我装的明明就是2005却出现那个问题
我明明就装的视2005,没有2000啊!
为什么用Java纯连接的时候还出现Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket这个问题啊?  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2009-03-02 12:38 | 为何
我的是xp,也是这个问题。微软太恶心了。  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2009-03-18 19:05 | agui2007
打上sp4的补丁就好了
还有打补丁时要注意,exe文件是解压缩还要自己双击setup的  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2009-04-11 00:47 | 真bt的问题呀
我SP3 SP4 ,SQLServer 2000 JDBC驱动装了 环境变量设了
三个包也导入了 在eclipse里面和MyEclipse里面都不能连接成功!
这段时间把头都搞大了 烦呀!
有哪个高手能帮我解决的 联系我呀!十分感谢
qq:466651088
email:ken2008huang@126.com
感谢大家了!  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2009-04-15 10:03 | 梁瑞芳
java.lang.NullPointerException
at dao.achieve.DBConnection.getResult(DBConnection.java:51)
at dao.achieve.DBUserAccountOpImp.getFriendList(DBUserAccountOpImp.java:285)
at GetFriendList.doPost(GetFriendList.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
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(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at dao.achieve.DBConnection.<init>(DBConnection.java:18)
at dao.achieve.DBUserAccountOpImp.<init>(DBUserAccountOpImp.java:17)
at dao.factory.DB_OPFactory.getDBUserOP(DB_OPFactory.java:10)
at GetFriendList.doPost(GetFriendList.java:36)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
2009-4-15 9:35:39 org.apache.catalina.core.StandardWrapperValve invoke  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2009-04-21 20:09 | sam
是啊,请高手帮忙一下,小弟也遇到这样的问题,sp4补丁装上了,但是就是连接不了  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2009-04-26 19:26 | 菜鸟
我用的SQL2005和MyEclipse连接,在学校连的上到自己的机器上也出现和上面一样的问题,急死人了哎,哪个高手帮忙下QQ:691259685。感激不尽!!!  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2009-04-27 22:28 | 菜鸟
课能是出现这样的问题!!我也不是很清楚,我是这样解决的.
-----连接出现的问题
private static final String DRIVER="com.microsoft.jdbc.sqlserver.SQLServerDriver"; private static final String URL="jdbc:microsoft:sqlsever://localhost:1433;databasename=数据库的名称";
private static final String DBNAME="sa";
private static final String DBPASS="sa";
public static Connection getConn() throws ClassNotFoundException, SQLException
{
Connection conn=null;
Class.forName(DRIVER);
conn=DriverManager.getConnection(URL,DBNAME,DBPASS);
return conn;
}
这里的DBNAME和DBPASS不能为空,应为MYCLIPSE和SQL的连接只能和sql身份验证的用户名和密码才能正确的连接。和WINDOWS的身份验证连接不行。呵呵这是我的理解,我也解决了这个问题,希望大家帮我看看,希望给出建议。  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2009-04-28 21:25 | carol.haul
@sssss
你的方法我试了,很管用,谢谢,一直困扰我多日的问题终于解决了,真的谢谢你~  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2009-07-24 14:43 |
这些方法我都试了,还是不行  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2009-07-26 23:47 | l
sql的两种方式windows和sql是否都能连接上sqlserver  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2009-08-23 08:48 | xiu
是不是端口的问题啊,我跟大家一样的情况。刚发现TCP端口写错了,在服务器端和客户端网络实用工具中设置一样的端口,在程序中连接数据库的时候也对应一样就可以了,我的是这样解决的  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2010-04-20 22:42 | 网管软件
在命令窗口执行Netstat -a -b 查看有没有sqlsvr.exe占用端口,如果没有在用SQLServer企业管理器中数据库的属性设置网络参数,把TCP/IP协议启用 端口为1433 上面的问题大都是这个原因.  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2010-12-20 22:46 | h
[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 com.wsy.dao.Dao.<init>(Dao.java:35)
at com.wsy.dao.Dao.executeQuery(Dao.java:47)
at com.wsy.dao.Dao.check(Dao.java:87)
at com.wsy.iframe.BookLoginIFrame$BookLoginAction.actionPerformed(BookLoginIFrame.java:40)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6216)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5981)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.wsy.dao.Dao.executeQuery(Dao.java:48)
at com.wsy.dao.Dao.check(Dao.java:87)
at com.wsy.iframe.BookLoginIFrame$BookLoginAction.actionPerformed(BookLoginIFrame.java:40)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6216)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at java.awt.Component.processEvent(Component.java:5981)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4556)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4150)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
我是用myeclipse运行的,我什么办法都试过了,希望那位高手帮我解决一下  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2011-01-11 18:03 | 钱宇皓
我的是XP系统装SQL2005也是出现上述问题!!跪求高手帮助!!邮箱qq429626538@163.com  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2011-03-12 16:46 | ltsznh
其实问题也许很简单,检查下防火墙是不是开着呢,关闭->搞定  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2012-03-29 14:04 | 大道
@jinglecat
  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
2012-03-29 14:13 | o2o
汗,慢慢研究  回复  更多评论
  
# re: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.[未登录]
2012-09-04 21:28 | 123
同出现这个问题,上面的都试过不行,求解决方案!!!297020949@qq.com  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: