可能是你Connection的对象里面包含实际数据的缘故,清空对象,重新编译可能会好的

解决方案 »

  1.   

    To : jinmin(★猪猪★) 
       你指的清空是什么意思??
       我的Connection是个实际的连接对象,
      急啊,还请帮忙
      

  2.   

    You should have nested Class Objects. What i meant was that you have a Class with a member Field which is an Object instead of a primitive type.
    For instance, we have member Field "String streetName" in Address Class. Then we have "Address addr" in Home Class. We nestedly have "Home home" in Professor Class, "Professor prof" in Department Class, and so on.
    Now we read your Exception Stacktrace, there are four "writeObject0"s, therefor, the Object you are attempting to write has at least four level deeper without hitting a primitive type(including String and Array). And, that type is not implementing Serializable.
    Take above instance as example, when defining Address Class, forgetting implementing it from Serializable will result a NotSerializableException when writing Object of Department instance.
    Hope you understand.