users@jaxb.java.net

InstantiationException when unmarshalling fpml instance document

From: Hunter Stern <vonrosen2000_at_yahoo.com>
Date: Sat, 8 Apr 2006 17:22:16 -0700 (PDT)

The Document class maps to the abstract element
Document:

        <xsd:complexType name="Document" abstract="true">
                <xsd:annotation>
                        <xsd:documentation xml:lang="en">The abstract base
type from which all FpML compliant messages and
documents must be derived.</xsd:documentation>
                </xsd:annotation>
                <xsd:attributeGroup ref="StandardAttributes.atts"/>
        </xsd:complexType>

The Document class is implemented by the DataDocument
class which is the element specified by the "type"
attribute in the instance document, <FpML
version="4-1" xsi:type="DataDocument", why doesn't
jaxb try to instantiate the DataDocument class instead
of Document?

Thanks,

Hunter


Hunter Stern wrote:
> Hi,
>
> I'm using Jaxb 2.0EA and getting the following
> exception when trying to unmarshall an fpml instance
> document, the com.riskman.fpml.Document class is
> abstract, xml pasted after the stack trace:

This usually means that in the instance document you
are using an
abstract element. Which element does this "Document"
class map to?



-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com