原因:cxf 依賴的xmlschema-core 與xfire-all依賴的xmlschema沖突。(百度搜索亦得知:cxf 依賴的xmlschema-core 與axis2-kernel依賴的xmlschema沖突也會導致,故說明
只是因為兩個jar有沖突,所以啥也不用問,干掉低版本的就ok了)
解決方法:因為我在當前項目中只用cxf就可以,而且Xfire的版本低(1.2.6),所以刪除Xfire的依賴。我用的是maven,所以在pom中去掉依賴就可以,如果是普通web項目,直接去lib下
干掉低版本的即可。去pom依賴如下:
<dependency>
<groupId>org.codehaus.xfire</groupId>
<artifactId>xfire-all</artifactId>
<version>1.2.6</version>
<exclusions>
<exclusion>
<groupId>org.apache.ws.commons</groupId>
<artifactId>XmlSchema</artifactId>
</exclusion>
</exclusions>
</dependency>