Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Incompatible AopNamespaceUtils signature change in Spring 2.5 [SPR-4459] #9137
Caused by: java.lang.NoSuchMethodError: org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(Lorg/springframework/beans/factory/xml/ParserContext;Ljava/lang/Object;)V
Affects: 2.5 final, 2.5.1
4 votes, 4 watchers
Cameron Braid commented
Here's a solution that uses reflection.
I tested this in my app that uses spring-2.5, and it gets past this point.
Juergen Hoeller commented
I've fixed this through reintroducing the Spring 2.0 registerAutoProxyCreatorIfNecessary and forceAutoProxyCreatorToUseClassProxying signatures in Spring 2.5.2.
So this should work fine now when compiling against Spring 2.0 and running on Spring 2.5. It should also work fine when compiling against Spring 2.5 and explicitly casting the source object to Object for picking the Spring 2.0 compatibility signature (instead of the Element one).