为什么使用不同的XPathFactory实现?

时间:2019-03-28 03:02:22

标签: java xpath

我的Java Web应用程序可在本地开发环境中工作,但在SIT环境中会失败。

本地开发环境:JDK7 + Jetty

JAXP: Looking up system property 'javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom'
JAXP: The property is undefined.
JAXP: found null in $java.home/jaxp.properties
JAXP: attempting to use the platform default W3C DOM XPath lib
JAXP: factory 'com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl' was found for http://java.sun.com/jaxp/xpath/dom
JAXP: using thread context class loader (WebAppClassLoader=iFinBMS@5501d1c8) for search

SIT环境:JDK7 + WebLogic10.3.6

JAXP: Looking up system property 'javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom'
JAXP: The property is undefined.
JAXP: found null in $java.home/jaxp.properties
JAXP: no META-INF/services/javax.xml.xpath.XPathFactory file was found
JAXP: attempting to use the platform default W3C DOM XPath lib
JAXP: instanciating org.apache.xpath.jaxp.XPathFactoryImpl
JAXP: failed to instanciate org.apache.xpath.jaxp.XPathFactoryImpl
java.lang.ClassNotFoundException: org.apache.xpath.jaxp.XPathFactoryImpl

为什么JAXP会尝试在本地环境中使用com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl,而在坐便环境中使用org.apache.xpath.jaxp.XPathFactoryImpl,是什么原因引起的?

0 个答案:

没有答案