Using an older version of Xerces or Xalan
If you are using an older version of Xerces (before 2.0) or Xalan (before 2.3) in the endorsed override, you might get a NullPointerException when you start your application. This exception occurs because these older versions do not handle the jaxp.properties file correctly.
To avoid this situation, use one of the following workarounds:
- Upgrade to a newer version of the application that implements the latest Java™ API for XML Programming (JAXP) specification (https://jaxp.dev.java.net/).
- Remove the jaxp.properties file.
- On AIX®, copy the jaxp.properties.sample file to jaxp.properties in /etc/java8[_64]/jre/lib. Uncomment the entries in the jaxp.properties file. Create a symbolic link to the jaxp.properties file from the /etc/java8[_64]/jre/lib directory.
- Set the system property for javax.xml.parsers.SAXParserFactory, javax.xml.parsers.DocumentBuilderFactory, or javax.xml.transform.TransformerFactory using the -D command-line option.
- Set the system property for javax.xml.parsers.SAXParserFactory, javax.xml.parsers.DocumentBuilderFactory, or javax.xml.transform.TransformerFactory in your application. For an example, see the JAXP 1.6 specification.
- Explicitly set the SAX parser, Document builder, or Transformer factory using the
IBM_JAVA_OPTIONS or OPENJ9_JAVA_OPTIONS environment
variable. For example, on a UNIX-based
system:
orexport IBM_JAVA_OPTIONS=-Djavax.xml.parsers.SAXParserFactory= org.apache.xerces.jaxp.SAXParserFactoryImpl
orexport IBM_JAVA_OPTIONS=-Djavax.xml.parsers.DocumentBuilderFactory= org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
On Windows, use the set command instead of export.export IBM_JAVA_OPTIONS=-Djavax.xml.transform.TransformerFactory= org.apache.xalan.processor.TransformerFactoryImplNote:
The IBM_JAVA_OPTIONS environment variable is deprecated and replaced by the
OPENJ9_JAVA_OPTIONS environment variable.
Note: The IBM XML
implementation is deprecated in IBM® SDK, Java Technology Edition, Version 8 and will be replaced by the Oracle XML
implementation in a future release.