Spring-Core-WS isn't compatible with Spring 4.3.0 is it?

本小妞迷上赌 提交于 2019-12-24 07:09:08

问题


I always try to use the latest jars/apis in my Spring project. We had a Spring 4.2.4.RELEASE and then I upgraded to 4.3.0. Everything builds and compiles just fine ... however, when I try to run my unit tests, I was getting an error message. I did trace it down to Spring-WS-Core and Spring-WS-Core-Test 2.3.0 pulls in: Spring-core, web, webmvc, beans 4.0.9.

Has anyone else seen this before? Do I have to go back to Spring 4.2?

Thanks!


回答1:


I downgraded my app to 4.2.7.RELEASE which was the latest before Spring 4.3.0, and this did not help. Ultimately, I had to update my maven dependencies as follows:

    <!-- Spring SOAP Client Dependencies -->
    <dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-ws-core</artifactId>
        <version>${spring.ws.core.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-expression</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <!-- Spring SOAP Client TEST Dependencies -->
    <dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-ws-test</artifactId>
        <version>${spring.ws.core.version}</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-expression</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

Why Spring Web-Services (for SOAP web-services) still uses Spring 4.0.9 and has not been updated yet to use Spring 4.2.x or 4.3.0 is beyond me. That seems like an oversight.

The symptoms of this problem is that I was getting ClassDefNotFound errors in various spring.framework packages. I think I have this problem resolved.



来源:https://stackoverflow.com/questions/38703522/spring-core-ws-isnt-compatible-with-spring-4-3-0-is-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!