Hi Varghese, Looks like confusion in the JiBX code, though it's not really well defined exactly how this should work. Can you enter a Jira on this? It should be easy to fix it so that extends are transitive (or if there's a real reason for the error, to add a check for it during binding validation rather than waiting until runtime).
- Dennis Dennis M. Sosnoski SOA and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Varghese C V wrote: > Given that there are classes A, B, C. > > B extends from A, C extends from B. > > All 3 classes have bindings defined as > > <mapping name="a" class="A" abstract="true"> > </mapping> > > <mapping name="b" class="B" extends="A" abstract="true"> > <structure map-as="A"/> > </mapping> > > <mapping name="c" class="C" extends="B"> > <structure map-as="B"/> > </mapping> > > It compiles fine, but throws a runtime exception -> > org.jibx.runtime.JiBXException: Mapping for type C must extend > abstract mapping for type A. > > It works when I change class C's mapping to > > <mapping name="c" class="C" extends="*A*"> > <structure map-as="B"/> > </mapping> > > Can someone tell me what causes this behavior? Is there something > wrong with my mappings? > > Thanks > Varghese C V > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > jibx-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jibx-users > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
