title: Hazelcast, HazelcastSerializationException: Failed to serialize 'com.hazelcast.spi.impl.operationservice.impl.operations.Backup'
body: <p>I have created custom entry processor for updating map entries by extending <code>AbstractEntryProcessor</code>. 
  When my app is running in a cluster on two instances, and the entry processor is executed I receive following exception: </p>
  
  <pre><code>com.hazelcast.nio.serialization.HazelcastSerializationException: Failed to serialize 'com.hazelcast.spi.impl.operationservice.impl.operations.Backup'
          at com.hazelcast.internal.serialization.impl.SerializationUtil.handleSerializeException(SerializationUtil.java:73)
          at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toBytes(AbstractSerializationService.java:143)
          at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toBytes(AbstractSerializationService.java:124)
          at com.hazelcast.spi.impl.operationservice.impl.OperationServiceImpl.send(OperationServiceImpl.java:406)
          at com.hazelcast.spi.impl.operationservice.impl.OperationBackupHandler.sendSingleBackup(OperationBackupHandler.java:187)
          at com.hazelcast.spi.impl.operationservice.impl.OperationBackupHandler.makeBackups(OperationBackupHandler.java:159)
          at com.hazelcast.spi.impl.operationservice.impl.OperationBackupHandler.backup(OperationBackupHandler.java:78)
          at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.sendBackup(OperationRunnerImpl.java:270)
          at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.handleResponse(OperationRunnerImpl.java:253)
          at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:182)
          at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:122)
          at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:102)
  Caused by: com.hazelcast.nio.serialization.HazelcastSerializationException: Failed to serialize 'com.hazelcast.map.impl.operation.PartitionWideEntryWithPredicateBackupOperation'
          at com.hazelcast.internal.serialization.impl.SerializationUtil.handleSerializeException(SerializationUtil.java:73)
          at com.hazelcast.internal.serialization.impl.AbstractSerializationService.writeObject(AbstractSerializationService.java:201)
          at com.hazelcast.internal.serialization.impl.ByteArrayObjectDataOutput.writeObject(ByteArrayObjectDataOutput.java:371)
          at com.hazelcast.spi.impl.operationservice.impl.operations.Backup.writeInternal(Backup.java:222)
          at com.hazelcast.spi.Operation.writeData(Operation.java:472)
          at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.write(DataSerializableSerializer.java:161)
          at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.write(DataSerializableSerializer.java:52)
          at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.write(StreamSerializerAdapter.java:41)
          at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toBytes(AbstractSerializationService.java:140)
          ... 10 common frames omitted
  Caused by: com.hazelcast.nio.serialization.HazelcastSerializationException: Failed to serialize 'com.hazelcast.map.AbstractEntryProcessor$EntryBackupProcessorImpl'
          at com.hazelcast.internal.serialization.impl.SerializationUtil.handleSerializeException(SerializationUtil.java:73)
          at com.hazelcast.internal.serialization.impl.AbstractSerializationService.writeObject(AbstractSerializationService.java:201)
          at com.hazelcast.internal.serialization.impl.ByteArrayObjectDataOutput.writeObject(ByteArrayObjectDataOutput.java:371)
          at com.hazelcast.map.impl.operation.PartitionWideEntryBackupOperation.writeInternal(PartitionWideEntryBackupOperation.java:98)
          at com.hazelcast.map.impl.operation.PartitionWideEntryWithPredicateBackupOperation.writeInternal(PartitionWideEntryWithPredicateBackupOperation.java:51)
          at com.hazelcast.spi.Operation.writeData(Operation.java:472)
          at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.write(DataSerializableSerializer.java:161)
          at com.hazelcast.internal.serialization.impl.DataSerializableSerializer.write(DataSerializableSerializer.java:52)
          at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.write(StreamSerializerAdapter.java:41)
          at com.hazelcast.internal.serialization.impl.AbstractSerializationService.writeObject(AbstractSerializationService.java:199)
          ... 17 common frames omitted
  Caused by: java.util.ConcurrentModificationException: null
          at java.util.ArrayList.writeObject(Unknown Source)
          at sun.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
          at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
          at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
          at java.io.ObjectOutputStream.writeObject0(Unknown Source)
          at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
          at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
          at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
          at java.io.ObjectOutputStream.writeObject0(Unknown Source)
          at java.io.ObjectOutputStream.writeObject(Unknown Source)
          at java.util.ArrayList.writeObject(Unknown Source)
          at sun.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
          at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
          at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
          at java.io.ObjectOutputStream.writeObject0(Unknown Source)
          at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
          at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
          at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
          at java.io.ObjectOutputStream.writeObject0(Unknown Source)
          at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
          at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
          at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
          at java.io.ObjectOutputStream.writeObject0(Unknown Source)
          at java.io.ObjectOutputStream.writeObject(Unknown Source)
          at com.hazelcast.internal.serialization.impl.JavaDefaultSerializers$JavaSerializer.write(JavaDefaultSerializers.java:242)
          at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.write(StreamSerializerAdapter.java:41)
          at com.hazelcast.internal.serialization.impl.AbstractSerializationService.writeObject(AbstractSerializationService.java:199)
          ... 25 common frames omitted
  </code></pre>
  
  <p>My entry processor is look like this: </p>
  
  <pre><code>public class HRUpdateRacesWithEntriesProcessor extends AbstractEntryProcessor&lt;HRMeeting.HRMeetingKey, HRMeeting&gt; {
  
    private List&lt;HRRace&gt; races;
    private Date date;
  
    public HRUpdateRacesWithEntriesProcessor(List&lt;HRRace&gt; races, Date date) {
      this.races = races;
      this.date = date;
    }
  
    @Override
    public Object process(Map.Entry&lt;HRMeeting.HRMeetingKey, HRMeeting&gt; entry) {
      HRMeeting meeting = entry.getValue();
      races.stream()
          .filter(race -&gt; entry.getKey().equals(new HRMeeting.HRMeetingKey(race.getMeetingDate(), race.getCourseId())))
          .forEach(newRace -&gt; {
            Optional&lt;HRRace&gt; matchedRace =
                meeting.getRaces().stream().filter(origin -&gt; origin.getKey().equals(newRace.getKey())).findFirst();
            if (newRace.getEntries() != null &amp;&amp; matchedRace.isPresent()) {
              newRace.setUpdateDate(date);
              newRace.getEntries().stream()
                  .filter(hrEntry -&gt; matchedRace.get().getEntries().stream().map(el -&gt; el.getKey())
                      .collect(Collectors.toList()).contains(hrEntry.getKey()))
                  .forEach(hrEntry -&gt; hrEntry.setUpdateDate(date));
              matchedRace.get().getEntries().retainAll(newRace.getEntries());
              newRace.getEntries().addAll(matchedRace.get().getEntries());
            }
            meeting.getRaces()
                .removeIf(hrRace -&gt; matchedRace.isPresent() &amp;&amp; matchedRace.get().getKey().equals(hrRace.getKey()));
            meeting.getRaces().add(newRace);
          });
      entry.setValue(meeting);
      return null;
    }
  }
  </code></pre>
  
  <p>For serialization my entites implements java <code>Serializible</code>. Is is can be reason of the issue? </p>
  
  <p>I am using hazelcast-3.8-SNAPSHOT</p>
  
  <p>Please, help me to solve it.</p>