JAXB - runtime marshall exception
:eek:The problem is :
I have to generate XML from a parent class(EmployeeNameDetails) containing a 'ArrrayList fundList'.
This generic class is populated by by three other class(these are mutually exclusive)
1. Company1Employee containing ArrayList<Company1FundDetails> fundDetails
2. Company2Employee containing ArrayList<Company2FundDetails> fundDetails;
3. Company3Employee containing ArrayList<Company3FundDetails> fundDetails;
So the fundList of EmployeeNameDetails can contain an arrayList of "Company1FundDetails" or "Company2FundDetails" or "Company3BONDFundDetails"
So the jaxb is giving error when i am trying to invoke marshall method.
as fundList contains data of type 'Object'.
- with linked exception:
[com.sun.istack.SAXException2: Instance of "model.Company1FundDetails" is substituting "model.Object", but "model.Company1FundDetails" is bound to an anonymous type.]"
Any suggestion to go around this problem.