StackOverflowError while generating a Record from XSD


I’m using the xCBL 4.0 Schema to create Records in SAP BC 4.6.
I use an XSD which includes several elements, so i have to decide which is the root element for the record. Some of the elements in that XSD work fine, but some throw the following exception:

Could not use that DTD or XML Document.
java.lang.reflect.InvocationTargetException: StackOverflowError

Any suggestions how to solve the problem?


PS: Maybe it is interesting to know, that the namespaces and there schemas are created, but not the record.

The Schema can be downloaded from (1,8MB)
Schema that doesn’t work: \schema\org\xcbl\path_delim\schemas\xcbl\ v4_0\ordermanagement\v1_0\ordermanagement.xsd (root node “Order”)

Schema that works:
\schema\org\xcbl\path_delim\schemas\ xcbl\v4_0\ordermanagement\v1_0\ ordermanagement.xsd (root node “OrderStatusResult”)

I had to modify the core.xsd so that SAP BC could find the typedefinitions [ATTACH]91[/ATTACH]
\schema\org\xcbl\path_delim\ schemas\xcbl\v4_0\core\core.xsd


It’s pretty difficult to diagnose the reason without taking a look at the schema you are working with. Can you add it as an attachment to your post?


No one got an idea?

Is there a possibility to raise my memory? Maybe it is realy to small for this Schema.

Sure, increasing the memory is an option to diagnose this problem. What is your current IS memory allocation?


I attempted to create a doc type from the Order element inside the ordermanagement.xsd using Developer / IS 6.5.

 com.wm.util.LocalizedException: [ISC.0082.9106] Complex type PackageReferenceType {rrn:org.xcbl:schemas/xcbl/v4_0/core/core.xsd} is recursive. 
webMethods Integration Server does not support creating a document type from an XSD with a recursive complex type.

As the error message states, IS does not support creating doc types from XSD’s containing recursive complex types.[/i]

[ISC.0082.9106]As you can see from line 18 in the schema fragment below, the element PackageReferenceType contains a recursive definition. You could modify this to remove the self-reference to get past this issue. Since this is an optional element (minOccurs=0) you could just remove it in this case.[/i]

[ISC.0082.9106]<xsd:complexType name=“PackageReferenceType”>
xsd:documentationprovides a reference for the packaging of the item.</xsd:documentation>
<xsd:element name=“Quantity” type=“QuantityType” minOccurs=“0”>
xsd:documentationis the quantity of the item in the referenced package, or the quantity of the item
per package, depending on the use.</xsd:documentation>
<xsd:element name=“PackageIDReference” type=“xsd:int”>
xsd:documentationreferences the package ID of the package containing the item
found in the PackageDetail element. </xsd:documentation>
<xsd:element name=“PackageReference” type=“PackageReferenceType” minOccurs=“0”>
xsd:documentationprovides a reference for the packaging of the item.</xsd:documentation>

[ISC.0082.9106]BTW, PackageDetailType is also recursive. Suggest you check with WM on how best to work with XCBL from SAP BC.


thx Mark,

I maybe found another recursive definition in CharacteristicAttributeType.xsd
I changed the PackageReferenceType and PackageDetailType by cutting out the recursive calls and now it works :slight_smile:

I got a kind of ‘StackOverflowError’ while using the ‘pub.xml:documentToXmlString’ service. I found out that this was because of a recursive document type existing in the input given to document of the above service.