Question

my junit test are passing when i am running

mvn test

but

mvn emma:emma


it has errors. How can i find out which classes are executed? The errors that i have are related to spring

java.lang.NoSuchMethodError: org.springframework.beans.BeanUtils.instantiateClass(Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/Object;
    at org.springframework.test.context.ContextLoaderUtils.resolveContextLoader(ContextLoaderUtils.java:87)

since the same config is working fine, i think that there are some problems with the classpath when i run emma.
Any advice is apreciated,
10x

Was it helpful?

Solution

Your spring-test version disagrees with your spring-beans version. Use mvn dependency:tree to find what's pulling in the relevant versions and use explicit top-level dependencies or dependency exclusions to manage them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top