java.lang.UnsupportedOperationException

问题:系统项目用的是maven,需要用到jaxen包,在pom中加入jaxen-1.1.1.jar之后,访问系统报下面的异常:

2016-11-10 11:02:54,695 ERROR [http-apr-8888-exec-4] -
java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"
at javax.xml.parsers.SAXParserFactory.setSchema(SAXParserFactory.java:419)
at org.apache.commons.digester.Digester.getFactory(Digester.java:536)
at org.apache.commons.digester.Digester.getParser(Digester.java:786)
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1058)
at org.apache.commons.digester.Digester.parse(Digester.java:1887)
at org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:329)
at org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO.loadDefinitionsFromURL(BaseLocaleUrlDefinitionDAO.java:276)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:251)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:58)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:239)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitions(CachingLocaleUrlDefinitionDAO.java:222)


经过排查依赖发现:加jaxen-1.1.1.jar的话会依赖xercesImpl-2.6.2这个包 后来换成jaxen-1.1.6的包之后就不依赖那个xercesImpl包了 异常也就解决了


解决:将jaxen-1.1.1.jar换成jaxen-1.1.6.jar


原因:好像是因为使用的jaxen包版本过低的缘故

你可能感兴趣的:(java.lang.UnsupportedOperationException)