Why do I get the following exception when trying to invoke XPathFactory.newInstance() in a Java 6 runtime? The runtime is hosting an OSGi container that underlies an Atlassian JIRA 4.1.x environment.
[INFO] [talledLocalContainer] Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFactory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
[INFO] [talledLocalContainer] at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:101)
How can an XPathFactory implementation not be found in a Java 6 environment? Is it because JIRA placed the following three JARs in my dependencies automatically (sucked in from an M2 REPO that is automatically created when setting up this plugin project):
How can I work around this?
xalan-2.7.0.jar is six years old, i.e. older than Java 1.6, and it was superceded by xalan-2.7.1 four years ago. I've been using the other two with xalan-2.7.1.jar in Java 6 for years, no problems at all.