Hazelcast 3.6.1 "There is no suitable de-serializer for type" exception
<p>I am using Hazelcast 3.6.1 to read from a Map. The object class stored in the map is called <strong>Schedule</strong>.</p>

<p>I have configured a custom serializer on the client side like this.</p>

<pre><code>ClientConfig config = new ClientConfig();
SerializationConfig sc = config.getSerializationConfig();
sc.addSerializerConfig(add(new ScheduleSerializer(), Schedule.class));
...
private SerializerConfig add(Serializer serializer, Class&lt;? extends Serializable&gt; clazz) {
    SerializerConfig sc = new SerializerConfig();
    sc.setImplementation(serializer).setTypeClass(clazz);
    return sc;
}
</code></pre>

<p>The map is created like this</p>

<pre><code>private final IMap&lt;String, Schedule&gt; map = client.getMap("schedule");
</code></pre>

<p>If I get from the map using schedule id as key, the map returns the <em><strong>correct</strong></em> value e.g.</p>

<pre><code>return map.get("zx81");
</code></pre>

<p>If I try to use an SQL predicate e.g.</p>

<pre><code>return new ArrayList&lt;&gt;(map.values(new SqlPredicate("statusActive")));
</code></pre>

<p>then I get the following error</p>

<pre><code>Exception in thread "main" com.hazelcast.nio.serialization.HazelcastSerializationException: There is no suitable de-serializer for type 2. This exception is likely to be caused by differences in the serialization configuration between members or between clients and members.
</code></pre>

<p>The custom serializer is using Kryo to serialize (based on this blog <a href="http://blog.hazelcast.com/comparing-serialization-methods/" rel="noreferrer">http://blog.hazelcast.com/comparing-serialization-methods/</a>)</p>

<pre><code>public class ScheduleSerializer extends CommonSerializer&lt;Schedule&gt; {

    @Override
    public int getTypeId() {
        return 2;
    }

    @Override
    protected Class&lt;Schedule&gt; getClassToSerialize() {
        return Schedule.class;
    }

}
</code></pre>

<p>The CommonSerializer is defined as</p>

<pre><code>public abstract class CommonSerializer&lt;T&gt; implements StreamSerializer&lt;T&gt; {

    protected abstract Class&lt;T&gt; getClassToSerialize();

    @Override
    public void write(ObjectDataOutput objectDataOutput, T object) {
        Output output = new Output((OutputStream) objectDataOutput);
        Kryo kryo = KryoInstances.get();
        kryo.writeObject(output, object);
        output.flush(); // do not close!
        KryoInstances.release(kryo);
    }

    @Override
    public T read(ObjectDataInput objectDataInput) {
        Input input = new Input((InputStream) objectDataInput);
        Kryo kryo = KryoInstances.get();
        T result = kryo.readObject(input, getClassToSerialize());
        input.close();
        KryoInstances.release(kryo);
        return result;
    }

    @Override
    public void destroy() {
        // empty
    }
}
</code></pre>

<p>Do I need to do any configuration on the <strong>server side</strong>? I thought that the client config would be enough.</p>

<p>I am using Hazelcast client 3.6.1 and have one node/member running.</p>