Hi,

I am trying to have communication between 2 JBIs via NMR in service mix 4
assembly. I am able to pass various standard java parameters e.g. String,
int etc. But facing problem during sending collection object of custom data
type.

I am sending a list of VO from a JBI and trying to read the same List as
incoming message in the next JBI.
e.g. List<TransitVO> transitList - is sent from source and same is to be
read at destination.

I could print the class of the object received from NMR as 'ArrayList' and I
am able to read the list size properly i.e. list is not NULL at destination. 
A simple for loop used for iterating through this list is giving me a class
cast exception.

                for (TransitVO transitVO : transitList) {
                        LOGGER.debug("******* Bank No :: " +
transitVO.getBankNo());
                }

A ClassCastException of kind, com.test.vo.TransitVO can not be cast to
com.test.vo.TransitVO is thrown Both data types in exception are same.
A Similar kind of issue found at below link :
https://issues.apache.org/jira/browse/SMXCOMP-397
Tried the solution suggested. It did not work. 

Please help.

Regards,
Tanvi.





--
View this message in context: 
http://servicemix.396122.n5.nabble.com/Class-cast-exception-while-sending-message-from-JBI-to-other-using-NMR-tp5715233.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to