Java 8 - java.lang.RuntimeException 上的 J2EE Mybatis webapp:XPathFactory#newInstance
J2EE Mybatis webapp on Java 8 - java.lang.RuntimeException: XPathFactory#newInstance
我们的 J2EE/Spring/Mybatis Web 应用程序在 Java 7(Centos)上 运行 已经运行了一段时间,但最近我们尝试将 JVM 更新到 Java 8 ,现在我们在启动时得到以下堆栈跟踪:
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:/usr/local/tomcats
/test/webapps/tms/WEB-INF/lib/saxon-xpath-8.7.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.ibatis.parsing.XPathParser.commonConstructor(XPathParser.java:261)
at org.apache.ibatis.parsing.XPathParser.<init>(XPathParser.java:121)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.<init>(XMLMapperBuilder.java:75)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.<init>(XMLMapperBuilder.java:70)
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.loadXmlResource(MapperAnnotationBuilder.java:158)
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parse(MapperAnnotationBuilder.java:113)
at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:66)
at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:651)
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:97)
我们的 Saxon9.jar 版本 = 9.1.0.8(最新)。
在我们的应用程序中解析xml/xslt涉及到很多不同的jars/dependencies,我不想通过反复试验来猜测要进行哪些更改。有谁知道这可能是什么原因造成的,或者首先要看哪里?
这个问题的描述是here。
如果您想将 Saxon 与 Java 8 一起使用,您需要将 Saxon 升级到版本 >= 9.5.1.5
我们的 J2EE/Spring/Mybatis Web 应用程序在 Java 7(Centos)上 运行 已经运行了一段时间,但最近我们尝试将 JVM 更新到 Java 8 ,现在我们在启动时得到以下堆栈跟踪:
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:/usr/local/tomcats
/test/webapps/tms/WEB-INF/lib/saxon-xpath-8.7.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.ibatis.parsing.XPathParser.commonConstructor(XPathParser.java:261)
at org.apache.ibatis.parsing.XPathParser.<init>(XPathParser.java:121)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.<init>(XMLMapperBuilder.java:75)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.<init>(XMLMapperBuilder.java:70)
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.loadXmlResource(MapperAnnotationBuilder.java:158)
at org.apache.ibatis.builder.annotation.MapperAnnotationBuilder.parse(MapperAnnotationBuilder.java:113)
at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:66)
at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:651)
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:97)
我们的 Saxon9.jar 版本 = 9.1.0.8(最新)。
在我们的应用程序中解析xml/xslt涉及到很多不同的jars/dependencies,我不想通过反复试验来猜测要进行哪些更改。有谁知道这可能是什么原因造成的,或者首先要看哪里?
这个问题的描述是here。 如果您想将 Saxon 与 Java 8 一起使用,您需要将 Saxon 升级到版本 >= 9.5.1.5