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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.springframework</groupId> | |
<artifactId>spring-orm</artifactId> | |
<version>3.2.2.RELEASE</version> | |
</dependency> |
Best Regards,