But this returns:
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.HashMap

The instance 'o' comes from a XMLRPC request. This request does not qualify variables correctly supposedly

Please have a look at this!?

EDIT:

Now I have the following issue:
o.getClass().getName() gives java.util.ArrayList,

o.get(0) gives [Ljava.lang.Object;@739e8329,

and o.get(0).getClass().getName() gives java.lang.String.

I cannot findout what to do..

EDIT2:

Finally I found out what happened. The software that created this object flattened a datastructure into a String (valueOf()). So, when I printed the variable it returned a [Ljava.util.Object, which was in fact a String containing this information.

I'm now a step further: I do the following: o.getClass().getName() --> java.util.ArrayList, and then o.get(0) --> [Ljava.lang.Object;@8sfajb8c or so, and then o.get(0).getClass().getName() --> java.lang.String (!!) How is that possible?
–
user441174Sep 7 '10 at 7:53

I think its just that you dont get what you expect to get.
–
InsertNickHereSep 7 '10 at 7:59

@InsertNickHere, I think you're right.. I have to explore what I'm getting. In PHP I would use var_dump, but it is hard to do that in Java. Any ideas?
–
user441174Sep 7 '10 at 8:05

I beg to differ on that point, Hashmap does inherit java.lang.Ojbect. Map is an interface, which I understood to be different but not the particular issue here.
–
ebtSep 7 '10 at 7:20

@ebt - this is exactly the issue. o extends Object, that's for sure, but to be able to cast this instance to Map, the instance has to be an implementation of Map too. (Actually he's casting to HashMap which is not necessary and doesn't change anything)
–
Andreas_DSep 7 '10 at 7:23