简体   繁体   English

spring-ws 2.2.2与spring 4.2.x兼容吗?

[英]Is spring-ws 2.2.2 compatible with spring 4.2.x?

I have a project that uses Spring 4.2.2. 我有一个使用Spring 4.2.2的项目。 In this project I use another one of my projects that depends on spring-ws 2.2.2. 在这个项目中,我将使用依赖于spring-ws 2.2.2的另一个项目。 Seems like spring-ws wants to use spring-aop and other spring libraries in version 4.0.9. 好像spring-ws想要在4.0.9版本中使用spring-aop和其他spring库。 When I want to deploy and run my web service this seemingly results in: 当我想部署和运行Web服务时,这似乎导致:

java.lang.NoSuchMethodError: org.springframework.aop.scope.ScopedProxyUtils.isScopedTarget

isScopedTarget wasn't defined until spring 4.1.4 according to https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/aop/scope/ScopedProxyUtils.html . 根据https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/aop/scope/ScopedProxyUtils.html,直到春天4.1.4才定义了isScopedTarget。

So: Is there any way I can use spring-ws 2.2.2 together with spring 4.2.x? 所以:有什么办法可以将spring-ws 2.2.2和spring 4.2.x一起使用?

Here's output from running mvn dependency:tree on the including project: 这是在包含项目上运行mvn dependency:tree的输出:

[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ net4care-mhd-fhir-server ---
[INFO] ca.uhn.hapi.fhir:net4care-mhd-fhir-server:war:1.3-SNAPSHOT
[INFO] +- ca.uhn.hapi.fhir:hapi-fhir-base:jar:1.3-SNAPSHOT:compile
[INFO] |  +- javax.json:javax.json-api:jar:1.0:compile
[INFO] |  +- org.glassfish:javax.json:jar:1.0.4:compile
[INFO] |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:compile
[INFO] |  |  +- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] |  |  \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] |  +- commons-codec:commons-codec:jar:1.10:compile
[INFO] |  +- commons-io:commons-io:jar:2.4:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.10:compile
[INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.7.10:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.4:compile
[INFO] |  \- org.apache.httpcomponents:httpcore:jar:4.4:compile
[INFO] +- ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:jar:1.3-SNAPSHOT:compile
[INFO] +- ca.uhn.hapi.fhir:hapi-fhir-testpage-overlay:war:1.3-SNAPSHOT:provided
[INFO] +- ch.qos.logback:logback-classic:jar:1.1.2:compile
[INFO] |  \- ch.qos.logback:logback-core:jar:1.1.2:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:3.0.1:provided
[INFO] +- org.thymeleaf:thymeleaf:jar:2.1.4.RELEASE:compile
[INFO] |  +- ognl:ognl:jar:3.0.8:compile
[INFO] |  +- org.javassist:javassist:jar:3.16.1-GA:compile
[INFO] |  \- org.unbescape:unbescape:jar:1.1.0.RELEASE:compile
[INFO] +- org.ebaysf.web:cors-filter:jar:1.0.1:compile
[INFO] +- org.net4care:xds-connector:jar:0.0.6-SNAPSHOT:compile
[INFO] |  +- org.springframework:spring-test:jar:4.2.1.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-core:jar:4.2.1.RELEASE:compile
[INFO] |  +- org.springframework.ws:spring-ws-core:jar:2.2.2.RELEASE:compile
[INFO] |  |  +- org.springframework.ws:spring-xml:jar:2.2.2.RELEASE:compile
[INFO] |  |  |  \- org.springframework:spring-context:jar:4.2.1.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-aop:jar:4.0.9.RELEASE:compile
[INFO] |  |  |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  |  +- org.springframework:spring-beans:jar:4.2.1.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-oxm:jar:4.0.9.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-web:jar:4.2.1.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-webmvc:jar:4.2.1.RELEASE:compile
[INFO] |  |     \- org.springframework:spring-expression:jar:4.2.1.RELEASE:compile
[INFO] |  +- org.apache.ws.commons.axiom:axiom-api:jar:1.2.14:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.1:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile
[INFO] |  |  \- org.apache.james:apache-mime4j-core:jar:0.7.2:compile
[INFO] |  +- org.apache.ws.commons.axiom:axiom-impl:jar:1.2.14:compile
[INFO] |  \- xmlunit:xmlunit:jar:1.6:compile
[INFO] +- net.sourceforge.cobertura:cobertura:jar:2.1.1:provided
[INFO] |  +- org.ow2.asm:asm:jar:5.0.1:provided
[INFO] |  +- org.ow2.asm:asm-tree:jar:5.0.1:provided
[INFO] |  +- org.ow2.asm:asm-commons:jar:5.0.1:provided
[INFO] |  +- org.ow2.asm:asm-util:jar:5.0.1:provided
[INFO] |  +- org.ow2.asm:asm-analysis:jar:5.0.1:provided
[INFO] |  +- oro:oro:jar:2.0.8:provided
[INFO] |  +- jaxen:jaxen:jar:1.1.4:compile
[INFO] |  +- org.apache.ant:ant:jar:1.8.3:provided
[INFO] |  |  \- org.apache.ant:ant-launcher:jar:1.8.3:provided
[INFO] |  +- org.apache.ant:ant-junit:jar:1.8.3:provided
[INFO] |  +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.14:provided
[INFO] |  +- org.mortbay.jetty:jetty-util:jar:6.1.14:provided
[INFO] |  \- com.sun:tools:jar:0:system
[INFO] +- junit:junit:jar:4.12:test
[INFO] +- org.hamcrest:java-hamcrest:jar:2.0.0.0:test
[INFO] \- org.mockito:mockito-all:jar:1.10.19:test

I solved the issue by adding the following exclusion to the pom of the including project: 我通过将以下排除项添加到包含项目的pom中来解决了该问题:

   <dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-ws-core</artifactId>
        <version>2.2.2.RELEASE</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM