i'm trying to create a new instance of xpath factory, it is running perfectly without any problem in my local machine but in my ubuntu server(16.0) java 1.7 instance throwing following error.
SEVERE: Caught exception : javax.xml.xpath.XPathFactoryConfigurationException: No XPathFactory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:268)
I have read the following articles,
https://saxonica.plan.io/issues/1944
Syntax error in javax.xml.xpath.XPathFactory provider-configuration file of Saxon-HE 9.3
And updated my code like the following,
xPathfactory = XPathFactory.newInstance(
XPathFactory.DEFAULT_OBJECT_MODEL_URI, "net.sf.saxon.xpath.XPathFactoryImpl",
ClassLoader.getSystemClassLoader());
but it is still throwing the following error.
I'm using saxon 9.3.0.5 version in both my local and server instance.
I'm using this version because it gives much faster xslt conversion compare to the latest version.
What am i doing wrong? Any help would be greatly appreciated. Thanks in advance.