Maven/Spring:AopNamespaceUtils NoSuchMethod错误 [英] Maven / Spring: AopNamespaceUtils NoSuchMethod Error

查看:141
本文介绍了Maven/Spring:AopNamespaceUtils NoSuchMethod错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Maven在Windows下构建我的项目可以很好地工作,但是当我在Linux下构建它时,我会得到一个与其中一个Spring库有关的NoSuchMethodError.

Using Maven to build my project under windows works fine, but when I build it under Linux I get a NoSuchMethodError regarding one of the spring libs.

我猜想这与跨平台的类加载器差异以及我的依赖项中的某处有关,我可能有两次相同的类,但是Windows正在加载一个,而Linux正在加载另一个?

I am guessing it is something to do with class loader differences cross-platform and somewhere in my dependencies and I may have the same class twice but windows is loading one while linux loads the other?

以前有没有人遇到过这个问题,或者对我如何进一步调试此错误有任何建议?

Has anyone come across this problem before, or have any advice on how I can debug this error further?

nested exception is java.lang.NoSuchMethodError:             
org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(Lorg/springframework/beans/factory/xml/ParserContext;Lorg/w3c/dom/Element;)V:
java.lang.NoSuchMethodError:     
org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(Lorg/springframework/beans/factory/xml/ParserContext;Lorg/w3c/dom/Element;)V
 at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser$AopAutoProxyConf

堆栈跟踪粘贴
POM.xml Pastie

推荐答案

您的spring依赖项有太多不同的版本:

Your spring dependencies have too many different versions:

org.springframework:spring-beans:jar:2.5.6:compile
org.springframework:spring-aop:jar:2.0.8:compile
org.springframework:spring-jms:jar:3.0.5.RELEASE:compile

org.springframework:spring-beans:jar:2.5.6:compile
org.springframework:spring-aop:jar:2.0.8:compile
org.springframework:spring-jms:jar:3.0.5.RELEASE:compile

使所有spring依赖项具有相同的版本(最好是3.0.5.RELEASE)

Make all spring dependencies have the same version (preferably 3.0.5.RELEASE)

这篇关于Maven/Spring:AopNamespaceUtils NoSuchMethod错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆