Serialization Exception in hazelcast 3.5 with Scala

59 views
Skip to first unread message

M.Ahsen Taqi Kazmi

unread,
Aug 20, 2015, 6:07:24 AM8/20/15
to Hazelcast
I am using Hazelcast 3.5 with scala 
i have a case class Abc i am trying to store object of my class in hazelcast from my client  but it gives me some serialization exception

here is my class 
   

     @SerialVersionUID(1)
        case class Abc( id : Int ,name : String , subjectCode : MutableList[Int]) extends Serialable 

when i run the client code it gives me following exception

    18:33:43.274 [hz._hzInstance_1_dev.partition-operation.thread-1] ERROR c.h.map.impl.operation.PutOperation - [192.168.15.20]:5701 [dev] [3.5] java.lang.ClassNotFoundException: scala.collection.mutable.MutableList
    com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.ClassNotFoundException: scala.collection.mutable.MutableList
    at com.hazelcast.nio.serialization.DefaultSerializers$ObjectSerializer.read(DefaultSerializers.java:201) ~[hazelcast-3.5.jar:3.5]
    at com.hazelcast.nio.serialization.StreamSerializerAdapter.read(StreamSerializerAdapter.java:41) ~[hazelcast-3.5.jar:3.5]
    at com.hazelcast.nio.serialization.SerializationServiceImpl.toObject(SerializationServiceImpl.java:276) ~[hazelcast-3.5.jar:3.5]
    at com.hazelcast.map.impl.mapstore.AbstractMapDataStore.toObject(AbstractMapDataStore.java:78) ~[hazelcast-3.5.jar:3.5]

Peter Veentjer

unread,
Aug 20, 2015, 6:13:52 AM8/20/15
to haze...@googlegroups.com
Do you have the MutableList class definition available on the machine where you are deserializing the object?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/d33c3ef3-ab75-4c2a-9d02-1fa2f6a3935f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

M.Ahsen Taqi Kazmi

unread,
Aug 20, 2015, 6:33:12 AM8/20/15
to Hazelcast
 i am running hcast server in a scala project and mutable list comes with scala
i have tried serializing and deserializing the class without hazelcast and it works fine but when i use it with hazelcast it gives me this exception. i even tried by giving my own class  loader  
is this the right way to do it ? 
Reply all
Reply to author
Forward
0 new messages