Upgrading from Spring 3.0.3.RELEASE results in: java.lang.NoSuchFieldError: USER_DECLARED_METHODS

家住魔仙堡 提交于 2019-12-04 03:05:50

It turned out two of our own dependencies both had dependencies on Spring 3.0.0.RELEASE. Adding an exclusion to each of these as:

<exclusions>
    <exclusion>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
    </exclusion>
</exclusions>

fixed the problem.

This smells like a Spring bug to me as I did not see this problem using 3.0.1, 3.0.2 or 3.0.3.

In response to your last comment, you can use the 'dependencyManagement' section of the POM to try to mitigate the Spring 3.0.0 requirement of your internal dependencies. This should force everything to use Spring 3.0.5.RELEASE if you place the proper 'dependency' elements under your dependencyManagement section.

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