java.lang.ClassCastException

hi all,

my code is having structure like this..

java.lang.Object _resp = _call.invoke(new java.lang.Object[] {param});

DIServerInfoArray diinfo = (DIServerInfoArray)_resp;

i am getting ClassCastException at the second line,can any one help me regarding this plz.

And the DIServerInfoArray declaration is as below

public class DIServerInfoArray implements java.io.Serializable {

......

It would be great, if anyone could have a look at them and help me out.

[512 byte] By [siva512a] at [2007-11-27 9:12:45]
# 1
What's there to help? The instance _resp is pointing to is simply not a DIServerInfoArray.
CeciNEstPasUnProgrammeura at 2007-7-12 21:59:36 > top of Java-index,Java Essentials,Java Programming...
# 2
http://forum.java.sun.com/thread.jspa?threadID=339295&messageID=1393853
Yannixa at 2007-7-12 21:59:36 > top of Java-index,Java Essentials,Java Programming...
# 3
ClassCastException happens when you try to cast an object to a class it's not an instance of (or it's subclass).The stacktrace should tell you the actual class of the object.
-Kayaman-a at 2007-7-12 21:59:36 > top of Java-index,Java Essentials,Java Programming...
# 4
make sure _call.invoke(new java.lang.Object[] {param});return the object of DIServerInfoArray or its sub class.
JL.Nayaka at 2007-7-12 21:59:36 > top of Java-index,Java Essentials,Java Programming...