Error:java.lang.ClassCastException: com.sonicsw.tools.esb.ju

Posted by hmac on 19-May-2010 11:03

While executing the code below:

while (response != null) {

            try {

            MsgResponse msgResponse = (MsgResponse)response;

           

            XQMessage respMsg = msgResponse.getResponseMessage();

           

            XQPart part = respMsg.getPart(0);            

           

            if(part == null){

            throw new Exception("No part");

            }

            }

            catch(Exception e){

            result.addError(this,e);

            }

            finally

            {

            prevResponse = response;

                response = response.getNextResponse(60000); // To get the next response

            }

        }

MsgResponse msgResponse = (MsgResponse)response; <-- throws a "java.lang.ClassCastException".

Can anyone tell me why this is happening?

All Replies

This thread is closed