0

I am trying to integrate KRYO Serialization with Hazelcast, but couldn't succeed due to below error.

The error occurs, when the Map is getting initalized. Can someone please shed some light on this?

Mar 16, 2014 3:00:39 PM com.hazelcast.map.operation.PutAllOperation
SEVERE: [10.153.233.113]:5700 [spring-group] [3.2-RC1] com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.LinkageError: loader (instance of  com/esotericsoftware/reflectasm/AccessClassLoader): attempted  duplicate class definition for name: "com/model/AgreementVOConstructorAccess"
com.hazelcast.query.impl.QueryException: com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.LinkageError: loader (instance of  com/esotericsoftware/reflectasm/AccessClassLoader): attempted  duplicate class definition for name: "com/model/AgreementVOConstructorAccess"
    at com.hazelcast.query.impl.QueryEntry.extractViaReflection(QueryEntry.java:96)
    at com.hazelcast.query.impl.QueryEntry.getAttribute(QueryEntry.java:79)
    at com.hazelcast.query.impl.IndexImpl.saveEntryIndex(IndexImpl.java:62)
    at com.hazelcast.query.impl.IndexService.saveEntryIndex(IndexService.java:68)
    at com.hazelcast.map.DefaultRecordStore.saveIndex(DefaultRecordStore.java:880)
    at com.hazelcast.map.DefaultRecordStore.putFromLoad(DefaultRecordStore.java:811)
    at com.hazelcast.map.operation.PutAllOperation.run(PutAllOperation.java:71)
    at com.hazelcast.spi.impl.BasicOperationService.processOperation(BasicOperationService.java:364)
    at com.hazelcast.spi.impl.BasicOperationService.access$800(BasicOperationService.java:107)
    at com.hazelcast.spi.impl.BasicOperationService$BasicOperationProcessorImpl.process(BasicOperationService.java:769)
    at com.hazelcast.spi.impl.BasicOperationScheduler$PartitionThread.process(BasicOperationScheduler.java:266)
    at com.hazelcast.spi.impl.BasicOperationScheduler$PartitionThread.doRun(BasicOperationScheduler.java:260)
    at com.hazelcast.spi.impl.BasicOperationScheduler$PartitionThread.run(BasicOperationScheduler.java:235)
Nirav Prajapati
  • 2,987
  • 27
  • 32

1 Answers1

0

Perhaps some code would be helpful.

I have added a Kryo serializer for hazelcast some time ago and I didn't run into problems:

http://hazelcast.org/kryo-serializer/

pveentjer
  • 10,545
  • 3
  • 23
  • 40
  • hi I have used the same as referred above.. But is failing while initializing the map.. Not sure if this is due to any concurrency as I have few maps backed by map store impl and loads the map on startup.. – user3340690 Mar 17 '14 at 20:28
  • hi sorry for delayed response. Yes I have used same the code you have published..just replaced with my object reference. – user3340690 Mar 24 '14 at 19:08
  • additional info: AgreementVO is of type Serializable and has 10 member variables of which one is custom type/Class(Entity) Should we even register this class? Mean register all referenced classes which are part of the objects that needs to be serialized? Any hints on possible cause for this error? – user3340690 Mar 24 '14 at 19:22
  • Afaik you only need to register the root class. – pveentjer Mar 24 '14 at 19:36