java Error establishing socket
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java Error establishing socket相关的知识,希望对你有一定的参考价值。
查询数据用到了两个表a和b,我先重一个a表中取出数据放到ArrayList(arr1)中,arr1的id是b表的sid相比较取出数据,我用的是for循环判断查询数据然后把数据放到一个ArrayList中,然后在页面中显示,查询数据量小的时候没有错误,数据量一大就报错
[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:207)
at com.dy.db.Out.update_score(Out.java:2074)
at com.dy.db.Out.print_user(Out.java:2410)
at org.apache.jsp.print_005fuser_jsp._jspService(print_005fuser_jsp.java:79)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at stat.StatFilter.doFilter(StatFilter.java:69)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at stat.EncodingFilter.doFilter(EncodingFilter.java:46)
at
可能的错误有:(我遇到过的)
1.先 看看 你数据库服务是否打开.
2. 你的server2000 没打sp3补丁,一般打SP3补丁就可以了
3.也可能是:比如你修改完 数据库的用户名和密码.必须重启(必须把 整个进程和服务都关了). 参考技术A 找个SQLServer 2000 sp4补丁打上就可以啦!
MS官方下载地址:http://www.microsoft.com/downloads/details.aspx?familyid=8E2DFC8D-C20E-4446-99A9-B7F0213F8BC5&displaylang=en 参考技术B SQL Server 2000的sp3的补丁没有打!!
楼上正解!
java io IOException Unable to establish loopback connection
1、错误描述
Starting preview server on port 8080
Modules:
HTML5 (/HTML5)
2017-06-17 11:13:04.823:INFO::main: Logging initialized @524ms
2017-06-17 11:13:05.017:INFO:oejs.Server:main: jetty-9.3.9.v20160517
java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:94)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:61)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:171)
at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
at java.nio.channels.Pipe.open(Pipe.java:155)
at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:127)
at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
at java.nio.channels.Selector.open(Selector.java:227)
at org.eclipse.jetty.io.ManagedSelector.newSelector(ManagedSelector.java:96)
at org.eclipse.jetty.io.ManagedSelector.doStart(ManagedSelector.java:90)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
at org.eclipse.jetty.io.SelectorManager.doStart(SelectorManager.java:273)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:260)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:81)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:390)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
Caused by: java.net.ConnectException: Connection timed out: connect
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Net.java:454)
at sun.nio.ch.Net.connect(Net.java:446)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
at sun.nio.ch.PipeImpl$Initializer$LoopbackConnector.run(PipeImpl.java:127)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:76)
... 25 more
2、错误原因
eclipse配置运行服务器时,使用的是HTTP Preview,但是由于本地防火墙的原因,导致报错
3、解决办法
(1)关闭本地防火墙
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow
以上是关于java Error establishing socket的主要内容,如果未能解决你的问题,请参考以下文章
Java EE项目 [SQLServer 2000 Driver for JDBC]Error establishing socket.
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket. at com
JDBC 操作 MSSQL 出现 Error establishing socket异常。
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket错误解决方法总结