Showing posts with label cobertura. Show all posts
Showing posts with label cobertura. Show all posts

Monday, August 22, 2011

cobertura spring proxy cglib problem : UnsatisfiedDependencyException

Just add the proxy-target-class="true" part within <aop:aspectj-autoproxy proxy-target-class="true" />

Thanks to http://royontechnology.blogspot.com/2010/08/cobertura-and-spring-auto-proxying.html

Faulty Stacktrace :
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException:
    Error creating bean with name '***' defined in class path resource [***]:
    Unsatisfied dependency expressed through constructor argument with index 0 of type [***]:
    Could not convert constructor argument value of type [$Proxy52] to required type [***]:
    Failed to convert value of type '$Proxy52 implementing net.sourceforge.cobertura.coveragedata.HasBeenInstrumented,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised' to required type '***'; nested exception is java.lang.IllegalStateException:
    Cannot convert value of type [$Proxy52 implementing net.sourceforge.cobertura.coveragedata.HasBeenInstrumented,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [***]: no matching editors or conversion strategy found ...

Sunday, November 14, 2010

Integration test coverage of WAR using cobertura

I've made a fork of codehaus cobertura-maven-plugin which enable the so long waited integration test coverage feature MCOBERTURA-86 until they commit something cool.

http://code.google.com/p/cobertura-it-maven-plugin/