gpt4 book ai didi

java - Cxf + Spring-boot (org.apache.cxf.bus.extension.ExtensionException)

转载 作者:行者123 更新时间:2023-12-03 18:27:21 48 4
gpt4 key购买 nike

我有带有 cxf 的 spring-boot 应用程序。当我运行它时,我得到一个异常:

[2017.03.01 17:37:35.839 MSK] [DEBUG] [o.a.c.c.s.ConfigurerImpl] [main]
[Could not determine bean name for instance of class org.apache.cxf.wsdl11.WSDLManagerImpl.]
[2017.03.01 17:37:35.841 MSK] [DEBUG] [o.a.c.r.DefaultResourceManager]
[main] [resolving resource <org.apache.cxf.wsdl11.WSDLManagerImpl/bus> type <interface org.apache.cxf.Bus>]
[2017.03.01 17:37:35.842 MSK] [DEBUG] [o.a.c.r.DefaultResourceManager]
[main] [resolving resource <null> type <interface org.apache.cxf.Bus>]
[2017.03.01 17:37:35.870 MSK] [DEBUG] [o.a.c.b.e.Extension] [main] [Could not load optional extension org.apache.cxf.binding.xml.wsdl11.XMLWSDLExtensionLoader]

org.apache.cxf.bus.extension.ExtensionException: Could not create object of extension class org.apache.cxf.binding.xml.wsdl11.XMLWSDLExtensionLoader.
at org.apache.cxf.bus.extension.Extension.load(Extension.java:241)
at org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(ExtensionManagerImpl.java:213)
at org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeansOfType(ExtensionManagerImpl.java:348)
at org.apache.cxf.bus.spring.SpringBeanLocator.getBeansOfType(SpringBeanLocator.java:153)
at org.apache.cxf.wsdl11.WSDLManagerImpl.setBus(WSDLManagerImpl.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)

跳过一些行和
Caused by: java.lang.NegativeArraySizeException: null
at org.objectweb.asm.Frame.a(Unknown Source)
at org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

cxf 和 spring-boot 的依赖
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-databinding-jaxb</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-management</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>

Spring Boot - 1.4.1
CXF - 3.1.7

请帮忙!!我怎样才能找到错误?

最佳答案

看来你有多个 asm项目中的依赖项。您可以通过执行 mvn dependency:tree 找到它们。从根项目,或通过在项目构建后查看工件。
要与 CXF 3.x 一起使用,您应该具有依赖性 org.ow2.asm:asm:jar:5.x.x和更大。

希望有帮助。

关于java - Cxf + Spring-boot (org.apache.cxf.bus.extension.ExtensionException),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42535788/

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