程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程綜合問答 >> net ocket xception-請問這個是什麼錯誤啊,求大家什麼幫忙看看

net ocket xception-請問這個是什麼錯誤啊,求大家什麼幫忙看看

編輯:編程綜合問答
請問這個是什麼錯誤啊,求大家什麼幫忙看看

java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(Unknown Source)
at java.io.ObjectOutputStream.writeNonProxyDesc(Unknown Source)
at java.io.ObjectOutputStream.writeClassDesc(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeFatalException(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at client.ClientDemo.main(ClientDemo.java:92)
Exception in thread "main" java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.flush(Unknown Source)
at java.io.ObjectOutputStream.flush(Unknown Source)
at java.io.ObjectOutputStream.close(Unknown Source)
at client.ClientDemo.main(ClientDemo.java:334)

最佳回答:


sjava.net.SocketException: Software caused connection abort: socket write error

Exception in thread "main" java.net.SocketException: Socket closed

根據這兩個判斷,你應該是在寫操作之前就關閉了socket吧?仔細檢查下

at client.ClientDemo.main(ClientDemo.java:**92**)

at client.ClientDemo.main(ClientDemo.java:**334**)

根據這兩個可以知道錯誤大概發生在92行和334行,從這裡入手檢查試試

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved