工厂方法“ annotationActionEndpointMapping”抛出异常

时间:2019-04-10 07:11:09

标签: spring spring-ws

我们在项目中使用Spring Web Services Maven依赖项。

最近我们将spring-ws-core的版本升级到了3.0.5.RELEASE

,并将spring-boot-starter-parent从2.5.9释放到2.1.0。

<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

我们的Web服务类注释如下:

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

0 个答案:

没有答案