1 回答

TA貢獻1793條經驗 獲得超6個贊
有什么想法,不兼容從何而來?
不兼容性來自項目中的依賴項:
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.5.1-1</version>
</dependency>
Saxon-HE-9.5.1-1.jar 包含一個服務 /META-INF/services/javax.xml.xpath.XPathFactory,其中包含非法包含空格的行:
net.sf.saxon.xpath.XPathFactoryImpl
http\://java.sun.com/jaxp/xpath/dom: net.sf.saxon.xpath.XPathFactoryImpl
http\://saxon.sf.net/jaxp/xpath/om: net.sf.saxon.xpath.XPathFactoryImpl
這在javax.xml.xpath.ServiceLoader.parseLine方法中失?。?/p>
....
if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0))
fail(service, u, lc, "Illegal configuration-file syntax");
....
嘗試升級您的 Saxon-HE 版本,因為9.5.1-1 相當舊(2013 年)并且似乎與 Java 8+ 不兼容。
版本 9.5.1-5 是第一個修復此錯誤的版本。
The following bugs are cleared in 9.5.1.5, issued 2014-03-25
...
1944 Illegal configuration-file syntax in META-INF/services/javax.xml.xpath.XPathFactory
添加回答
舉報