Фабричный метод annotationActionEndpointMapping выдал исключение - PullRequest
0 голосов
/ 10 апреля 2019

В нашем проекте мы используем зависимость Maven от Spring Web Services.

Недавно мы обновили версию spring-ws-core: до 3.0.5.RELEASE

и spring-boot-starter-родительский до 2.1.0. ВЫПУСКАЙТЕ с 1.5.9

<dependency>
    <groupId>org.springframework.ws</groupId>
    <artifactId>spring-ws-core</artifactId>
    <version>3.0.4.RELEASE</version>
</dependency>

до

<dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-ws-core</artifactId>
        <version>3.0.5.RELEASE</version>
</dependency>

После этого мы видим ниже ошибку при запуске JAR.Хотя ошибки компиляции нет.

 Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate 
 [org.springframework.ws.soap.addressing.server.AnnotationActionEndpointMapping]: Factory method 'annotationActionEndpointMapping' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/xml/DocumentBuilderFactoryUtils
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:620)
    ... 19 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/xml/DocumentBuilderFactoryUtils
    at org.springframework.ws.soap.addressing.version.AbstractAddressingVersion.<clinit>(AbstractAddressingVersion.java:66)
    at org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMapping.initDefaultStrategies(AbstractAddressingEndpointMapping.java:107)
    at org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMapping.<init>(AbstractAddressingEndpointMapping.java:98)
    at org.springframework.ws.soap.addressing.server.AbstractActionEndpointMapping.<init>(AbstractActionEndpointMapping.java:38)
    at org.springframework.ws.soap.addressing.server.AbstractActionMethodEndpointMapping.<init>(AbstractActionMethodEndpointMapping.java:34)
    at org.springframework.ws.soap.addressing.server.AnnotationActionEndpointMapping.<init>(AnnotationActionEndpointMapping.java:60)
    at org.springframework.ws.config.annotation.WsConfigurationSupport.annotationActionEndpointMapping(WsConfigurationSupport.java:120)
    at org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$4d910591.CGLIB$annotationActionEndpointMapping$6(<generated>)
    at org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$4d910591$$FastClassBySpringCGLIB$$75c1c4c4.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
    at org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$4d910591.annotationActionEndpointMapping(<generated>)
    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.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
    ... 20 common frames omitted

Наша аннотация класса веб-службы выглядит следующим образом:

@WebService(serviceName = "XYZService",
        portName = "XYZPort",
        targetNamespace = "http://www.scte.org/wsdl/130-3/2010/adm",
        endpointInterface = "org.scte.wsdl._130_3._2010.adm.ADM")
...