users@jaxb.java.net

InternalError when parsing XML schema

From: Petra Malik <petra_at_cs.waikato.ac.nz>
Date: Fri, 06 Jun 2003 09:24:49 +1200

Hi,

I get

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
Caused by: java.lang.InternalError
    at
com.sun.tools.xjc.reader.xmlschema.ct.ComplexTypeFieldBuilder._assert(ComplexTypeFieldBuilder.java:75)
   ...

when parsing the schema

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.cs.waikato.ac.nz/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:Z="http://www.cs.waikato.ac.nz/" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
        <xs:element name="GrandChild" type="Z:GrandChildType"/>
        <xs:element name="GreatGrandChild" type="Z:GreatGrandChildType"/>

        <xs:complexType name="ParentType" mixed="false"/>
        <xs:complexType name="ChildNType">
                <xs:complexContent>
                        <xs:extension base="Z:ParentType">
                                <xs:sequence>
                                        <xs:element ref="Z:GrandChild"/>
                                </xs:sequence>
                        </xs:extension>
                </xs:complexContent>
        </xs:complexType>
        <xs:complexType name="Child1Type">
                <xs:complexContent>
                        <xs:extension base="Z:ParentType">
                                <xs:sequence>
                                        <xs:element ref="Z:GreatGrandChild"/>
                                </xs:sequence>
                        </xs:extension>
                </xs:complexContent>
        </xs:complexType>
        <xs:complexType name="GrandChildType">
                <xs:complexContent>
                        <xs:extension base="Z:Child1Type"/>
                </xs:complexContent>
        </xs:complexType>
        <xs:complexType name="GreatGrandChildType">
                <xs:complexContent>
                        <xs:extension base="Z:GrandChildType"/>
                </xs:complexContent>
        </xs:complexType>
</xs:schema>

And yes, I use the new JAXB v1.0.1.
Is it a bug or do I something wrong?

Petra