Problems with large maxOccurs attribute in XML TCK tests
Richard.Barnes at stratus.com
Thu Feb 3 11:59:40 PST 2011
We have recently successfully ported OpenJDK6 b12 to our proprietary
OpenVOS operating systems, and are now running the TCK tests against our
implementation. When running tests such as
JCK-devtools-6b, we get the following error:
[ERROR] Current configuration of the parser doesn't allow a maxOccurs
attribute value to be set greater than the value 5,000.
We have tried ways of getting around this, such as trying Andrew Haley's
fix documented at
3.html or another fix we found in a build of OpenJDK7, and we get the
following warning before getting successful compilation of the schemas:
[WARNING] Unable to check the correctness of the schema due to
OutOfMemoryError. This typically happens when your schema contains
constructs like maxOccurs="999". In the future compilation, add the -nv
option to skip the correctness check for faster compilation.
We have tried adding the "-nv" option, but when we do that, other tests
that are expected to fail, suddenly pass, so we think that doing that
would not be correct.
We recognize that the above warning comes from the fact that
SchemaConstraintChecker.java actually builds the nodes that represent
the schema, and with a large maxOccurs attribute, this uses up tons of
So far, we have found versions of Xerces after Version 2.9.1 that deal
with this problem, but the changes to put this in to our current
implementation are quite large.
Has anybody else run into this problem and found a good solution?
Senior Technical Consultant
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the porters-dev