Hi, The ClassCastException here has nothing to do with SMXCOMP-397.
It's actually from that com.test.vo.TransitVO loaded by different classloaders, in OSGi container, it means two bundles contain class com.test.vo.TransitVO, most likely your SA embed the com.test.vo.TransitVO, which is incorrect. You should ensure only one bundle contain com.test.vo.TransitVO and from you SA bundles, you refer this class but not embed this class. likely in your SA/SU, add <classpath> <library>osgi:Bundle-SymbolicName-which-contain-Bundle-SymbolicName</library> </classpath> Freeman ------------- Freeman(Yue) Fang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://fusesource.com | http://www.redhat.com/ Twitter: freemanfang Blog: http://freemanfang.blogspot.com http://blog.sina.com.cn/u/1473905042 weibo: @Freeman小屋 On 2012-12-11, at 下午6:23, Tanvi wrote: > 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.
