Map
s should usually be avoided in interfaces, especially when it involves serialization.
Instead, try to replace your map by an other data structure containing the same data.
For instance, create an object like:
public class MyObject implements Serializable {
Key keyOfMap;
Value valueOfMap;
}
And send a List<MyObject>
or equivalent.
This should avoid all your map problems.