开发者

ClassCast exception issue

I am getting this exception -

[java] Exception in thread "main" java.lang.ClassCastException: java.lang.Object cannot be cast to ws.v1.tmf854.snc.http.GetAllExplicitPathsResponse

though i have the code properly casted. Have a look at the code below.

            Object t = expRPC.getAllExplicitPaths(mtosiHeader, mtosiBody);
            //expList = expRPC.getAllExplicitPaths(mtosiHeader, mtosiBody);


            System.out.println("Type---->"+t.getClass()+ t.hashCode() + t.toString());

The type of expList is the return type e开发者_运维技巧xpected for getAllExplicitPaths(). Since i got classcast exp, i casted it to type Object.

Still i am getting the same error.

Any help is appriciated.

Thanks...


I think the cast error is not in the code you post...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜