HiveContext和Saxon的Spark工作正常,除非在代碼中沒有定義UDF。在UDF實現的情況下 - HiveContext初始化失敗並報錯。我聽說有撒克遜\ java8 incompability撒克遜9.5.1.5解決了,這是不是在中央Maven倉庫尚未公佈爲免費版本:HiveUDF + saxon 9.1.0.8 + Java8 =未能創建XPathFactory
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: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: jar:file:/JBOD_D19/hadoop/cdh/yarn/nm/usercache/u23120d1/appcache/application_1477998759081_5017/container_e45_1477998759081_5017_01_000001/saxon-xpath-9.1.0.8.jar!/META-INF/services/javax.xml.xpath.XPathFactory:2: Illegal configuration-file syntax at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:102) at org.apache.hadoop.hive.ql.udf.xml.UDFXPathUtil.(UDFXPathUtil.java:41) at org.apache.hadoop.hive.ql.udf.xml.GenericUDFXPath.(GenericUDFXPath.java:53)