You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Main {
public static void main(String[] args){
HazelcastInstance hz = Hazelcast.newHazelcastInstance();
IMap<String,Employees> map = hz.getMap("foo");
map.put("1", new Employees());
Employees employees = map.get("1");
System.out.println(employees);
}
static class Employees extends ArrayList {
}
}
The following exception is thrown:
Exception in thread "main" java.lang.ClassCastException: java.util.ArrayList cannot be cast to com.hazelcast.Main$Employees
at com.hazelcast.Main.main(Main.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
The following example shows the problem:
The following exception is thrown:
For more information see:
http://stackoverflow.com/questions/33103491/need-for-custom-serializers-while-using-derivatives-of-arraylist-as-value-in-haz
The text was updated successfully, but these errors were encountered: