当前位置: 首页 > 工具软件 > JAXP > 使用案例 >

property not supported by org.apache.xerces.jaxp.DocumentBuilderFactoryImpl 程序启动错误

景阳平
2023-12-01

错误详情:

Error creating bean with name 'annotationActionEndpointMapping' defined in class path resource [org/springframework/ws/config/annotation/DelegatingWsConfiguration.class]: 
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.ws.soap.addressing.server.AnnotationActionEndpointMapping]: 
Factory method 'annotationActionEndpointMapping' threw exception; nested exception is java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V

原因:

引入的用于处理DOM4j中XPath的jaxen包有问题

处理方法:去除冲突依赖

<dependency>
  <groupId>jaxen</groupId>
  <artifactId>jaxen</artifactId>
  <version>1.1</version>
  <exclusions>
    <exclusion>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
    </exclusion>
  </exclusions>
</dependency>

 类似资料: