qq_25134045
TeslaHua
2016-03-20 11:30

java 客户端往服务器端传递一个对象时,总是卡死,求解答。

  • java
  • 服务器
  • writeobject
  • 客户端

java 客户端往服务器端用ObjectOutputStream的writeObject()传递一个对象时,总是卡死。
java.net.BindException: Address already in use: JVM_Bind
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: sun.applet.AppletAudioClip
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1355)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2000)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1924)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
at GoBangGame.GoBangServer$HandleGoBang.receiveMoveFromPlayer(GoBangServer.java:289)
at GoBangGame.GoBangServer$HandleGoBang.run(GoBangServer.java:99)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.NotSerializableException: sun.applet.AppletAudioClip
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at GoBangGame.GoBangClient.sendMoveToServer(GoBangClient.java:129)
at GoBangGame.GoBangClient.run(GoBangClient.java:104)
... 1 more

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答