I keep getting the following exception on one of our live servers (the others running the same code seem ok):
java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/domwith the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:67)
I'm pretty sure that I have the Xalan and Saxon jars in the classpath (using IBM Java 1.5).
Do you have any Ideas what else could be wrong?
Edit:
That's the code that causes the Problem:
XPathFactory factory = XPathFactory.newInstance();
And it's running on a custom web server that's roughly based on the catalina engine.
You need to add the appropriate .jar in your classpath. In my case I used the Saxon-HE library.
There exists a bug in Saxon9 you maybe run into like me.
The bug has been corrected in version 9.5.1.5. So you may download the latest Saxon 9 HE.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With