it happens because operation routed to wrong member:
[java] 2018-01-16 10:55:00.977 [hz.default-0.cached.thread-4] ERROR com.bagri.server.hazelcast.impl.QueryManagementImpl - runQuery.error:
[java] com.hazelcast.nio.serialization.HazelcastSerializationException: Failed to serialize 'com.hazelcast.map.impl.operation.EntryOperation'
[java] at com.hazelcast.internal.serialization.impl.SerializationUtil.handleSerializeException(SerializationUtil.java:73) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toBytes(AbstractSerializationService.java:154) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toBytes(AbstractSerializationService.java:125) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.spi.impl.operationservice.impl.OperationServiceImpl.send(OperationServiceImpl.java:410) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvokeRemote(Invocation.java:539) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.spi.impl.operationservice.impl.Invocation.doInvoke(Invocation.java:517) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke0(Invocation.java:490) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.spi.impl.operationservice.impl.Invocation.invoke(Invocation.java:200) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.spi.impl.operationservice.impl.InvocationBuilderImpl.invoke(InvocationBuilderImpl.java:59) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.map.impl.proxy.MapProxySupport.executeOnKeyInternal(MapProxySupport.java:1012) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.map.impl.proxy.MapProxyImpl.executeOnKeyInternal(MapProxyImpl.java:100) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.map.impl.proxy.MapProxyImpl.executeOnKey(MapProxyImpl.java:706) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.bagri.server.hazelcast.impl.DocumentManagementImpl.storeDocumentInternal(DocumentManagementImpl.java:974) ~[classes/:na]
[java] at com.bagri.server.hazelcast.impl.DocumentManagementImpl.storeDocument(DocumentManagementImpl.java:931) ~[classes/:na]
[java] at com.bagri.xquery.saxon.ext.doc.StoreDocument$1.call(StoreDocument.java:69) ~[bagri-xquery-saxon-1.2.0-RC1.jar:na]
[java] at net.sf.saxon.functions.IntegratedFunctionCall.iterate(IntegratedFunctionCall.java:284) ~[Saxon-HE-9.7.0-20.jar:na]
[java] at net.sf.saxon.query.XQueryExpression.iterator(XQueryExpression.java:323) ~[Saxon-HE-9.7.0-20.jar:na]
[java] at com.bagri.xquery.saxon.XQProcessorServer.execQuery(XQProcessorServer.java:148) ~[bagri-xquery-saxon-1.2.0-RC1.jar:na]
[java] at com.bagri.xquery.saxon.XQProcessorServer.executeXQuery(XQProcessorServer.java:163) ~[bagri-xquery-saxon-1.2.0-RC1.jar:na]
[java] at com.bagri.server.hazelcast.impl.QueryManagementImpl.runQuery(QueryManagementImpl.java:743) [classes/:na]
[java] at com.bagri.server.hazelcast.impl.QueryManagementImpl.executeQuery(QueryManagementImpl.java:685) [classes/:na]
[java] at com.bagri.server.hazelcast.task.query.QueryExecutor$1.call(QueryExecutor.java:56) [classes/:na]
[java] at com.bagri.server.hazelcast.task.query.QueryExecutor$1.call(QueryExecutor.java:53) [classes/:na]
[java] at com.bagri.server.hazelcast.impl.TransactionManagementImpl.callInTransaction(TransactionManagementImpl.java:360) [classes/:na]
[java] at com.bagri.server.hazelcast.task.query.QueryExecutor.call(QueryExecutor.java:53) [classes/:na]
[java] at com.bagri.server.hazelcast.task.query.QueryExecutor.call(QueryExecutor.java:21) [classes/:na]
[java] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_112]
[java] at com.hazelcast.executor.impl.DistributedExecutorService$CallableProcessor.run(DistributedExecutorService.java:241) [hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:227) [hazelcast-all-3.8.7.jar:3.8.7]
[java] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_112]
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_112]
[java] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_112]
[java] at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64) [hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80) [hazelcast-all-3.8.7.jar:3.8.7]
[java] Caused by: com.hazelcast.nio.serialization.HazelcastSerializationException: Failed to serialize 'com.bagri.server.hazelcast.task.doc.DocumentProcessor'
[java] at com.hazelcast.internal.serialization.impl.SerializationUtil.handleSerializeException(SerializationUtil.java:73) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.internal.serialization.impl.AbstractSerializationService.writeObject(AbstractSerializationService.java:251) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.internal.serialization.impl.ByteArrayObjectDataOutput.writeObject(ByteArrayObjectDataOutput.java:370) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.map.impl.operation.EntryOperation.writeInternal(EntryOperation.java:634) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.spi.Operation.writeData(Operation.java:549) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.write(DataSerializableSerializer.java:197) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.write(DataSerializableSerializer.java:49) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.write(StreamSerializerAdapter.java:43) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toBytes(AbstractSerializationService.java:151) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] ... 32 common frames omitted
[java] Caused by: java.io.NotSerializableException: com.bagri.core.server.api.ParseResults
[java] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) ~[na:1.8.0_112]
[java] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) ~[na:1.8.0_112]
[java] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) ~[na:1.8.0_112]
[java] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) ~[na:1.8.0_112]
[java] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) ~[na:1.8.0_112]
[java] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) ~[na:1.8.0_112]
[java] at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.write(JavaDefaultSerializers.java:242) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.write(StreamSerializerAdapter.java:43) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] at com.hazelcast.internal.serialization.impl.AbstractSerializationService.writeObject(AbstractSerializationService.java:249) ~[hazelcast-all-3.8.7.jar:3.8.7]
[java] ... 39 common frames omitted
to resolve it:
pass uri hashCode as property and use it on client side to route operation properly
it happens because operation routed to wrong member:
to resolve it: