将CXF自上而下的Web服务部署到Weblogic 12.2.1时出错

时间:2016-04-14 07:41:52

标签: java cxf maven-3 weblogic12c

这是一个使用cxf-codegen-plugin创建的简单自上而下的CXF Web服务,但在将war / ear文件部署到Weblogic 12.2.1服务器时出现以下错误:

Servlet: "cxf" failed to preload on startup in Web application: "SampleInfo.war".
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.bus.spring.SpringBus]: **Constructor threw exception; nested exception is org.apache.cxf.bus.extension.ExtensionException: Could not load extension class org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl.**
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:997)

Caused By: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw exception; nested exception is org.apache.cxf.bus.extension.ExtensionException: **Could not load extension class org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl.**

**Caused By: org.apache.cxf.bus.extension.ExtensionException: Could not load extension class org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl.**

Caused By: java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClassInternal(GenericClassLoader.java:1065)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:998)
Truncated. see log file for complete stacktrace
**The dependencies under pom.xml are as under:**

cxf-rt-frontend-jaxws Version 3.1.4
cxf-rt-transports-http Version 3.1.4
cxf-xjc-runtime Version 3.0.5
spring-web Version 4.1.4.RELEASE

1 个答案:

答案 0 :(得分:2)

neethi.jar和cxf-rt-ws-policy.jar有一些冲突在我从war文件中删除了cxf jar时解决了。