I have a project A which uses AnnotationConfigApplicationContext to define the application context like:
private static AnnotationConfigApplicationContext getApplicationContext() {
if (applicationContext == null) {
applicationContext = new AnnotationConfigApplicationContext(AdapterContext.class);
}
return applicationContext;
}
This code works fine within project A.
Now, i added project A to the build path of project B (by choosing project properties ->java build path ->projects tab) . Now, i have a testcase in project B which uses the method
getApplicationContext()
. When i run this test case, i get the error:
java.lang.NoSuchMethodError: org.springframework.core.GenericTypeResolver.resolveTypeArguments(Ljava/lang/Class;Ljava/lang/Class;)[Ljava/lang/Class;
I tried debugging my code and found that it is working fine till the method getApplicationContext() is called.
Does anyone know what i have to do to make this work? Thanks