MDT-XSD-FAQ-Sun JDK14 Crimson DOM
The Crimson DOM implementation in (some versions of) the Sun JDK 1.4 has a bug in the implementation of
hasAttributeNS. This bug can be seen, when loading or importing a model from XML Schema, as either:
- a null pointer exception, or
- the error message "Specify a valid XML Schema and try loading again".
To avoid this, use the following to control the JAXP implementation:
<eclipse-install-dir>eclipse.exe -vmargs -Djava.endorsed.dirs=<path-to-your-xerces-jars-folder>
For your convenience, here are some links to XML4J and Xerces2-J, for anyone wishing to use Eclipse 3.0M8 or later.
- If you use the IBM JDK 1.4 or a 5.0 JDK instead of the SUN JDK 1.4, this workaround is not required.
- If you will NOT be loading or importing model(s) from XML Schema, or do not plan to use the XSD plugin, but intend to generate models from Rose, annotated java code, or using pre-existing ecore file(s), this workaround is also not required. EMF & SDO will work fine without Xerces.
- Please do NOT open any bugs or post comments to the newsgroup regarding the absence of Xerces in the Eclipse plugin directory or that the above workaround no longer works.