gpt4 book ai didi

java - 将 CXF 自顶向下 Web 服务部署到 Weblogic 12.2.1 时出错

转载 作者:行者123 更新时间:2023-12-02 03:43:08 25 4
gpt4 key购买 nike

这是一个使用 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

最佳答案

neethi.jar 和 cxf-rt-ws-policy.jar 存在一些冲突,当我从 war 文件中删除 cxf jar 时,这些冲突得到了解决。

关于java - 将 CXF 自顶向下 Web 服务部署到 Weblogic 12.2.1 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36616681/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com