Results 1 to 1 of 1
  1. #1
    Maloy is offline Member
    Join Date
    Oct 2010
    Rep Power

    Default 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'.
    Exception is:
    - 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.
    Last edited by Maloy; 11-02-2010 at 03:02 PM. Reason: change the problem description

Similar Threads

  1. Runtime Exception
    By vishalrimt in forum New To Java
    Replies: 2
    Last Post: 08-08-2010, 07:07 AM
  2. Replies: 1
    Last Post: 11-20-2009, 08:58 PM
  3. Jaxb
    By Paul Richards in forum XML
    Replies: 1
    Last Post: 08-03-2009, 10:56 PM
  4. JAXB Marshalling
    By akbar4ums in forum XML
    Replies: 1
    Last Post: 12-20-2008, 05:39 AM
  5. CORBA MArshall Exception while calling EJB
    By vishnu_cec in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 11-22-2007, 06:16 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts