sgroschupf / zkclient

a zookeeper client, that makes life a little easier.
www.datameer.com
Apache License 2.0
1.08k stars 491 forks source link

deserialize stream with error #60

Open hudalong opened 8 years ago

hudalong commented 8 years ago

When I add a data listener with child path in zookeeper, then I changed the data in this child path, the listener invoke with an error: [call stack] ERROR org.I0Itec.zkclient.ZkEventThread - Error handling event ZkEvent[Data of /dubbo/com.Handler/providers/myTest changed sent to com.we.monitor.service.util.zk.ZkClientZkClient$3@5f0f8407] org.I0Itec.zkclient.exception.ZkMarshallingError: java.io.StreamCorruptedException: invalid stream header: 6E696861 at org.I0Itec.zkclient.serialize.SerializableSerializer.deserialize(SerializableSerializer.java:37) at org.I0Itec.zkclient.ZkClient.derializable(ZkClient.java:740) at org.I0Itec.zkclient.ZkClient.readData(ZkClient.java:773) at org.I0Itec.zkclient.ZkClient$6.run(ZkClient.java:546) at org.I0Itec.zkclient.ZkEventThread.run(ZkEventThread.java:71) Caused by: java.io.StreamCorruptedException: invalid stream header: 6E696861 at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804) at java.io.ObjectInputStream.(ObjectInputStream.java:299) at org.I0Itec.zkclient.serialize.SerializableSerializer.deserialize(SerializableSerializer.java:31)

winniwang commented 7 years ago

I think you can try it. https://github.com/sgroschupf/zkclient/issues/48