Hi,
I debugged into this issue and found that EclipseLink is getting tangled up
in our schemas. What we're doing in the schemas doesn't seem to be that
weird, but please tell me if it is.
I'm doing an XML-Direct mapping for Address.attentionOfName that has an
XPath like "ns1:AttentionOfName/text()".
In the top-level schema First.xsd, we have Address defined this way:
<xsd:complexType name="AddressBaseType" abstract="true">
<xsd:sequence>
<xsd:element ref="AttentionOfName" minOccurs="0" maxOccurs="unbounded"/>
...
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="AddressType">
<xsd:complexContent>
<xsd:extension base="AddressBaseType">
...
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
The top-level schema includes a second schema: <xsd:include
schemaLocation="Second.xsd"/>
The second schema includes a third schema: <xsd:include
schemaLocation="Third.xsd"/>
Third.xsd has:
<xsd:element name="AttentionOfName" type="NameType"></xsd:element>
and:
<xsd:complexType name="NameType">
<xsd:simpleContent>
<xsd:extension base="foo:NameType"/>
</xsd:simpleContent>
</xsd:complexType>
Third.xsd references Fourth.xsd this way:
xmlns:foo="http://www.foo.org/bar/baz/1.1"
<xsd:import namespace="http://www.foo.org/bar/baz/1.1"
schemaLocation="../Fourth.xsd"/>
Fourth.xsd says:
<xsd:complexType name="NameType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="languageID"
type="xsd:language" use="optional">
</xsd:attribute>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
By using the debugger, I can see that EclipseLink finds the ComplexType
"NameType" declared inside Fourth.xsd (I can tell by the namespace), but
then it just keeps going around and around, thinking that foo:NameType
extends foo:NameType. It never figures out that foo:NameType extends
xsd:string and stops. I looked inside the XML file that the workbench
generated for First.xsd, and I can't really make sense of it. I don't see
any mention of NameType extending any String type though.
Is this kind of configuration supported in EclipseLink?
Thanks,
Polly
amphoras wrote:
Just to clarify, I mean that when I right-click the project and select
Export -> Project Deployment XML..., I get the stack overflow error.
Thanks,
Polly