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
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.