Re: com.hazelcast.nio.HazelcastSerializationException: Problem when serializing type 0

1,271 views
Skip to first unread message

Lukas Blunschi

unread,
Feb 11, 2013, 11:37:38 AM2/11/13
to haze...@googlegroups.com
Hi Malaka,

does this problem occur *all* the time? If so, then its probably an issue with how you serialize the objects. You will have to ensure, that all the class members of the objects which you put into the map are Serializable or - if that is not feasible - write special

void readObject(ObjectInputStream in) {...}
void writeObject(ObjectOutputStream out) {...}

methods for the Java Serialization.

Best,
Lukas

Am Montag, 11. Februar 2013 15:11:50 UTC+1 schrieb Malaka Ekanayake:
Hi all,

I am using Hazelcast to synchronize data  between  swing application running on a LAN . I have developed a prototype and base on the results of the prototype I started on the real swing application. But i'm getting com.hazelcast.nio.HazelcastSerializationException: Problem when serializing type 0 with the swing app. 

Hazelcast is configured through spring

I'm using hazelcast 2.5 and hazelcast-spring 2.5. 
All my map entities have implemented Serializable and have a default constructor. 

But every time a member try to join to the cluster it gives following stack trace

Feb 11, 2013 7:27:57 PM com.hazelcast.cluster.ClusterService
SEVERE: [10.20.11.199]:6701 [dev] error processing messages  packet=Packet [REMOTELY_PROCESS] name=remotelyProcess, connection=Connection [/10.20.11.183:43318 -> Address[10.20.11.183]:6701] live=true, client=false, type=MEMBER,blockId=-1, keySize=0, valueSize=395 client=false obj=com.hazelcast.nio.HazelcastSerializationException: Problem when serializing type 0 callId=-1
com.hazelcast.nio.HazelcastSerializationException: Problem when serializing type 0
at com.hazelcast.nio.AbstractSerializer.toObject(AbstractSerializer.java:128)
at com.hazelcast.nio.AbstractSerializer.toObject(AbstractSerializer.java:156)
at com.hazelcast.nio.Serializer.readObject(Serializer.java:71)
at com.hazelcast.impl.ThreadContext.toObject(ThreadContext.java:135)
at com.hazelcast.nio.IOUtil.toObject(IOUtil.java:163)
at com.hazelcast.cluster.ClusterManager$8.process(ClusterManager.java:167)
at com.hazelcast.cluster.ClusterService.processPacket(ClusterService.java:185)
at com.hazelcast.cluster.ClusterService.dequeuePackets(ClusterService.java:236)
at com.hazelcast.cluster.ClusterService.run(ClusterService.java:200)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Problem reading DataSerializable class : com.hazelcast.cluster.JoinInfo, exception: java.io.EOFException
at com.hazelcast.nio.Serializer$DataSerializer.read(Serializer.java:107)
at com.hazelcast.nio.Serializer$DataSerializer.read(Serializer.java:79)
at com.hazelcast.nio.AbstractSerializer.toObject(AbstractSerializer.java:121)

You help is greatly appreciated because I'm stuck with this issue for few days now. 

Regards
Malaka   

Malaka Ekanayake

unread,
Feb 12, 2013, 12:40:32 AM2/12/13
to haze...@googlegroups.com
Hi Lukas,

Thanks for the reply. 

Yes. I have double checked all the class member which I put in to the map are Serializable . All the class members have a default constructor as well. 
Yet the problem occur *all* the time. I have attached my model classed for your reference. 

I used the Berkeley DB Java Edition to implement the PersistanceStore hens some annotations were added to the model classes. 

Regards,
Malaka
model.zip

Malaka Ekanayake

unread,
Feb 12, 2013, 1:16:22 AM2/12/13
to haze...@googlegroups.com
Hi Lukas,

Just figure out what the issue was. It's dumb mistake from our side :) Two clients we tested were in two different versions. (2.5 and 2.4.1)  ( forgot to run the mvn eclipse:clean eclipse:eclipse after updating the hezelcart version in one PC ). Anyway thanks for your prompt reply. 

Also I would like to actively involved in the HAZELCAST COMMUNITY EDITION. I don't know if this is the right please to ask that question. But after using hazelcast for some time  I am very mush interested in joining the community, 


Regards
Malaka

   

On Monday, February 11, 2013 10:07:38 PM UTC+5:30, Lukas Blunschi wrote:

Fuad Malikov

unread,
Feb 12, 2013, 12:33:05 PM2/12/13
to haze...@googlegroups.com
Hi Malaka,

It is always welome. Please have a look at Hazelcast 3: https://github.com/hazelcast/hazelcast/tree/3.0. It is almost ready and any feedback, fix, test, new implementation, improvement is welcome. 

-fuad

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at http://groups.google.com/group/hazelcast?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages