急急急!!!
java.net.ConnectException: 不允许联接
程序在我的电脑上运行正确,但将应用程序于被另一个程序调用,部署到Tomcat后启动,点击页面就报的这个错误,那位高手帮我看看。
java.net.
ConnectException: 不允许联接
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
at sun.net.www.http.HttpClient.New(HttpClient.java:304)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
at java.net.URL.openStream(URL.java:1007)
at com.xml.JW.load(JW.java:112)
at com.xml.JW.getFileDataFromXML(JW.java:42)
at org.apache.jsp.site._1.Transfer_jsp._jspService(Transfer_jsp.java:71)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(Unknown Source)
at org.apache.jasper.servlet.JspServletWrapper.service(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at org.apache.catalina.connector.CoyoteAdapter.service(Unknown Source)
at org.apache.coyote.http11.Http11Processor.process(Unknown Source)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Unknown Source)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Unknown Source)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
------解决方案--------------------怀疑是IP连接的问题
------解决方案--------------------连接失败。。
你连接的远程的客户端吗??
IP和端口正确吗?
把你socket部分的代码也贴来看看。。
------解决方案--------------------1.先单独启动下tomcat,看能否启动
2.看数据库实例是否正确
3.检查配置文件