I’ve a hash map like :
Map gen = HashMap<Integer, MyObj>
When I execute AccessController.doPrivileged(gen), it throws exception as follows. Can anyone help me on this.
java.security.PrivilegedActionException: java.io.NotSerializableException: java.util.HashMap
at java.security.AccessController.doPrivileged(Native Method)...
This code is getting executed in Weblogic environment.
Your key is
Integerwhich isSerializableby default. What is insideMyObj? I mean are there any objects insideMyObj?