Hi Echo,
the property is called “excludes” not "exclude”. Also for agent configuration
the VM name is expected. Please try
<excludes>
<exclude>com/model/AssetType</exclude>
</excludes>
Also see https://github.com/jacoco/jacoco/issues/34
<https://github.com/jacoco/jacoco/issues/34>
Regards,
-marc
> On 4. Feb 2020, at 22:17, Echo Xu <[email protected]> wrote:
>
>
> Hi,
>
> I ran into this issue https://github.com/jacoco/jacoco/issues/168
> <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]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/169c5eb6-5304-4fd8-8a5d-0a28447ebd9b%40googlegroups.com
>
> <https://groups.google.com/d/msgid/jacoco/169c5eb6-5304-4fd8-8a5d-0a28447ebd9b%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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/11BC9264-6C16-4F3A-BD5D-EC2349E0D0EA%40mountainminds.com.