当前位置: 代码迷 >> Android >> Android错误总结- java.net.SocketTimeoutException: Transport endpoint is not connected
  详细解决方案

Android错误总结- java.net.SocketTimeoutException: Transport endpoint is not connected

热度:496   发布时间:2016-05-01 11:02:15.0
Android异常总结--- java.net.SocketTimeoutException: Transport endpoint is not connected
1.查询号码归属地中出现的异常:
 java.net.SocketTimeoutException: Transport endpoint is not connected
at org.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSocketImpl


(Native Method)
at org.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSocket


(OSNetworkSystem.java:130)
at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:246)
at org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:533)
at java.net.Socket.connect(Socket.java:1055)
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>


(HttpConnection.java:62)
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get


(HttpConnectionPool.java:88)
at 


org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHTTPConnec


tion(HttpURLConnectionImpl.java:927)
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect


(HttpURLConnectionImpl.java:909)
at 


org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.sendRequest


(HttpURLConnectionImpl.java:1325)
at 


org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequestInte


rnal(HttpURLConnectionImpl.java:1656)
at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.doRequest


(HttpURLConnectionImpl.java:1649)
at 


org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getOutputStre


am(HttpURLConnectionImpl.java:1248)
at com.credream.test.XMLTest.testSendXml(XMLTest.java:31)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)
//这里应该是url出错的问题:
  String path="http://192.168.0.110:6118/MobileAddressQueryTest/XmlServlet";
  写成局域网的地址.
  相关解决方案