I am getting run time marshalling exception when I use these multi level extension mappings and read Jibx supports multi level extension??

Any help is greatly appreciated.

 

Here are my Java objects

 

public class Customer implements Serializable {

      private Product product;

}

public class Product implements Serializable{

      protected agentId = null;

}

public class Prospect extends Product{

      private int prospectId;

}

public class Quote extends Prospect {

}

 

My binding is

 

<mapping class="Customer" name="customer">

      <structure field="product" usage="optional" />

</mapping> 

<mapping abstract="true" class="Product">

      <value style="element" name="agentId" field="agentId" usage="optional" />

</mapping>

     

<mapping class="Prospect" abstract="true" extends="Product">

      <value style="element" name="prospectId" field="prospectId" usage="optional" />

      <structure map-as=" Product"></structure>

</mapping>

     

<mapping class="Quote" name="quote" extends="Prospect">

      <structure map-as="Prospect"></structure>

</mapping>

 

 

getting this following exception at run time

 

org.jibx.runtime.JiBXException: Mapping for type Quote must extend abstract mapping for type Product

 

Thanks

Siva

           

Reply via email to