OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [ubl-dev] UBL XSD to Java code generation and compilation

At 2009-02-26 18:32 +1100, Yeu-Wen Mak wrote:
>Has anyone encountered out-of-memory errors when trying to compile 
>java classes that are generated from XSD2EJB tools such as one we 
>are using from Oracle JDeveloper in a contract-first development approach?
>Because the UBL XSDs are so nested, resulting in hundreds of java 
>helper classes being generated, the compilation fails even with a 
>4GB RAM windows machine we are using for development.

Be aware some models are very large when fully expanded with all 
parent/child relationships being realized.

The XPath files found here:


enumerate all of the hierarchical in-context elements and attributes 
for each of the models, not including the infinite recursion of 
self-referencing objects.  These reports stop at the first detection 
of a loop in the hierarchy.

My recollection is there are over 800,000 elements and attributes in 
a fully-expanded model of just the Order document.

>Anyone has found ways to get around it, beside flatening out the 
>entire XSD model tree into a single generic string type?

Can you deal with your XML as SAX events instead of pre-compiled Java 
classes?  There is a very small memory footprint for accessing any 
XML document using SAX events:


I hope this helps.

. . . . . . . . . . . Ken

XQuery/XSLT training in Prague, CZ 2009-03 http://www.xmlprague.cz
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/u/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/u/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]