users@jaxb.java.net

Stack Overflow during Unmarshal

From: Matt Minyard <mminyard_at_gmail.com>
Date: Wed, 16 Nov 2005 17:50:20 -0600

Hi,

I'm using JWSDP 1.6 which includes JAXB RI 1.0.5. I compiled a schema that
includes the following section:

        <xs:element name="UNITSTATUS">
                <xs:annotation>
                        <xs:documentation>Unit Status Aggregate</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                        <xs:sequence minOccurs="0" maxOccurs="unbounded">

                                <xs:element ref="UNITVERSION" minOccurs="0"/>
                                <xs:element ref="BATTERYSTATUS" minOccurs="0"/>
                                <xs:element ref="UNITFAULT" minOccurs="0" maxOccurs="unbounded"/>

                        </xs:sequence>
                </xs:complexType>
        </xs:element>




When I try to unmarshall an XML file that includes UNITSTATUS elements in
the content, I get a java.lang.StackOverflowError. If I change the
xs:sequence element's maxOccurs to 1, it works fine (as long as the XML file
only includes 1 UNITSTATUS element). Also, if the XML file doesn't include
any UNITSTATUS elements, it also works fine.

Does anyone have any idea what might be causing this or how I could get
around it?


Thanks,

Matt