无法加载扩展类org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl [英] Could not load extension class org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
问题描述
我正在为cxf配置的类上运行junit。我收到此错误
,其原因是:org.apache.cxf.bus.extension.ExtensionException:无法加载扩展类org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl。
,当我要求Spring检索他的类的实例时。 Maven依赖项包括cxf 2.7.4(cxf-rt-ws-policy-2.7.4.jar),我看到还包括neethi 3.0.2.jar。另一篇文章提到了将neethi 2.x与cxf 2.x一起使用的问题。但这不是我的情况。
I'm running junit on a class that is configured for cxf. I get this error Caused by: org.apache.cxf.bus.extension.ExtensionException: Could not load extension class org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl. when I ask Spring to retrieve the instance on he class. maven dependency includes cxf 2.7.4 (cxf-rt-ws-policy-2.7.4.jar) and I see neethi 3.0.2.jar is also included. Another post mentioned an issue if neethi 2.x was used with cxf 2.x. but this is not my case.
推荐答案
使用 mvn依赖项:tree
来找出哪个依赖项也具有 org.apache.neethi:neethi:{version}
。就我而言,它是 org.wso2.carbon.core
。
要解决此问题,我首先在依赖项pom树中添加了所需的neethi依赖项。
Use mvn dependency:tree
to find out which dependency also has the org.apache.neethi:neethi:{version}
. In my case it was the org.wso2.carbon.core
.
To fix this I added the neethi dependency needed, first in my dependency pom tree.
这篇关于无法加载扩展类org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!