Tuesday, 20 August 2013

Cannot cast object to hashmap

Cannot cast object to hashmap

My code:
Object res = stub.call(sessionId, "sale.list", "11111");
HashMap<String, String> map = (HashMap<String, String>) res;
Converting object into HashMap i got following exception,
Exception in thread "main" java.lang.ClassCastException: [Ljava.util.HashMap;
cannot be cast to java.util.HashMap
Can anyone help me how to retrieve object data?

No comments:

Post a Comment