2017-03-01 5 views
1

Ich habe Spring-Boot-Anwendung mit CXF. Wenn ich es laufen lasse, bekomme ich eine Ausnahme:Cxf + Spring-Boot (org.apache.cxf.bus.extension.ExtensionException)

[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) 

überspringen einige Zeilen und

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) 

Abhängigkeiten von cxf und Feder-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> 

feder boot - 1.4.1 cxf - 3.1.7

Bitte helfen Sie !! Wie kann ich einen Fehler finden?

+0

Können Sie bitte auch hier cxf-Konfiguration hinzufügen. Die ersten und letzten Abhängigkeiten sind optional –

+0

Sieht aus, als gäbe es einige Jar-Konflikte in Ihrem Projekt. Sie brauchen nur ' org.apache.cxf cxf-rt-Frontend-jaxws $ {cxf.version} org.apache.cxf cxf-RT- transports-http-hc $ {cxf.version} 'für cxf jaxws. –

Antwort

0

Es scheint, dass Sie mehrere asm Abhängigkeiten in Ihrem Projekt haben. Sie können sie finden, indem Sie mvn dependency:tree aus dem Root-Projekt ausführen oder indem Sie nach der Erstellung eines Projekts nach Artefakten suchen. Für die Verwendung mit CXF 3.x sollten Sie die Abhängigkeit org.ow2.asm:asm:jar:5.x.x und höher haben.

Hoffe, dass hilft.