Showing posts with label exception. Show all posts
Showing posts with label exception. Show all posts

Wednesday, July 17, 2013

Exception: NoSuchMethodError, org.springframework.beans.factory.annotation.InjectionMetadata

If you are doing Unit Test with Spring Framework you will have to keeping the correct configuration of jar files that you have in you repository, sometimes if you dont have all the jar´s in you classpath exceptions will occur like this one:

java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class,

With a stacktrace like this one...

It is said that you dont have the correct jar with the request method, after the first line of the above stack you can follow the method of the request jar, in this is case you see: "org.springframework.orm", finally you only need to add spring-orm dependency or jar file to your classpath.

 
Best Regards,