HiveUDF + saxon 9.1.0.8 + Java8 = failed to create an XPathFactory

前端 未结 1 574
旧巷少年郎
旧巷少年郎 2021-01-25 08:13

My Spark job with HiveContext and Saxon working fine unless no UDFs defined in code. In case of UDF implementation - HiveContext initialization failed with error. I heard there

1条回答
  •  北海茫月
    2021-01-25 08:30

    Correct, using the XPathFactory.newInstance() method from Java8 with an older release of Saxon on the classpath will cause this failure. So use a newer version of Saxon. The current release is 9.7.0.11.

    Recent releases of Saxon can be found in Maven. We resisted putting Saxon in Maven for many years because downloading from Maven does not satisfy the condition required some of the third-party software components we use, that say you must not distribute the JAR files without also distributing the legal terms and conditions. We eventually relented because of overwhelming demand, despite the fact that distributing via Maven still violates this condition. Organisations that care about these things should not use Maven.

    0 讨论(0)
提交回复
热议问题