使用Maven在windows下构建我的项目效果很好,但是当我在Linux下构建它时,我得到了一个关于spring lib的NoSuchMethodError。
我猜这与类加载器的差异有关,跨平台,在我的依赖项中的某个地方,我可能有两个相同的类,但windows加载一个而linux加载另一个?
以前有没有人遇到过这个问题,或者对如何进一步调试这个错误有什么建议?
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$AopAutoProxyConfStack Trace Pastie
POM.xml Pastie
发布于 2011-06-14 01:19:07
spring依赖项有太多不同的版本:
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)
https://stackoverflow.com/questions/6333684
复制相似问题