Hi,

I ran into this issue https://github.com/jacoco/jacoco/issues/168 when 
integrate JaCoCo to our spring boot project. The error is as below:

{code}
org.springframework.beans.NotReadablePropertyException: Invalid property 
'$jacocoData' of bean class [com.model.AssetType]: Bean property 
'$jacocoData' is not readable or has an invalid getter method: Does the 
return type of the getter match the parameter type of the setter?
at 
org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:622)
at 
org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:612)
at 
com.base.repository.BaseInfoMongoRepository.updateByOrganizationIdAndId(BaseInfoMongoRepository.java:37)
at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
{code}

I know this is because JaCoCo instrumented the AssetType class and added 
some methods to it and Spring reflection logic fails due to that. I tried 
exclude the class AssetType from being instrumented via however it when 
running the integration test (which will use this class), it still gets the 
same error, my question is why AssetType is not excluded for 
instrumentation in this case? 

<plugin>
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
    <version>0.8.2</version>
    <configuration>
        <exclude>com/model/AssetType.class</exclude>
    </configuration>
    ....
</plugin>


Thanks,
Echo

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/169c5eb6-5304-4fd8-8a5d-0a28447ebd9b%40googlegroups.com.

Reply via email to