“IllegalStateException: Incompatible execution data for class in…” exception from Jacoco when run fo

222 views
Skip to first unread message

kees...@gmail.com

unread,
Oct 26, 2016, 6:26:51 AM10/26/16
to JaCoCo and EclEmma Users
I’m trying to test a legacy big fat EAR (app.ear) application using Arquillian and TestNG. To run the test I have added the testable war file (test.war) in to the existing app.ear and deployed on WildFly 10 server remotely.

The next part of my requirement is to get code coverage report after the tests are run. For that I’m using Jacoco and running it with Jacoco Maven Plugin.
The app.ear gets deployed and the even the tests are running fine but when it comes to generate the report the Jacoco is failing with and exception “IllegalStateException: Incompatible execution data for class in Jacoco ………”

The exception is coming only for the class which contains the test cases. If I exclude that class using exclusion tag in Jacoco Maven Plugin the exception goes away but the reports generated by Jacoco contains no data. Also I’ve checked jacoco.exec and as far as I can say it contains valid data.

Since I cannot share the proprietary code I’m working with, I’ve created three simple projects on github to emulate the same.

Project 1 (currencycoverter - https://github.com/keeshaaw/currencyconverter): This project has one stateless ejb with a remote interface having three methods.
Project 2 (earapp - https://github.com/keeshaaw/earapp): This project creates the ear file using project 1 as an ejb module.
Project 3 (eartest - https://github.com/keeshaaw/eartest): This project test the ear generated by project 2.

To me it looks like that there is some bug in the Jacoco but I might be wrong also. Please help me out.

Evgeny Mandrikov

unread,
Oct 26, 2016, 7:10:12 AM10/26/16
to JaCoCo and EclEmma Users, kees...@gmail.com
First of all - which JaCoCo version do you use?
Second - please make sure that JaCoCo version used for generation of exec file is the same as used for generation of report.
Message has been deleted

kees...@gmail.com

unread,
Oct 26, 2016, 8:17:32 AM10/26/16
to JaCoCo and EclEmma Users, kees...@gmail.com

Thanks for the prompt reply. I was using 0.7.4.201502262128 version of Jacoco. As you have suggested I've moved to the latest version which is 0.7.7.201606060606. Now I'm no longer getting the exception. The report generated by Jacoco in ${project.basedir}/target/site/jacoco/index.html file still has no data in it. Am I missing something here?

Evgeny Mandrikov

unread,
Oct 29, 2016, 2:14:12 PM10/29/16
to JaCoCo and EclEmma Users, kees...@gmail.com
What means "no data in it"? It doesn't show any files? or it shows 0 for all files?

Keshaw Pandey

unread,
Nov 3, 2016, 2:08:53 AM11/3/16
to JaCoCo and EclEmma Users, kees...@gmail.com
Sorry for the delayed reply. By "no data in index.html" I mean that the index.html file is empty (no data in any of the columns of the table in index.html) but the jacoco.exec does contain correct data about the classes, executed and total probes.

Evgeny Mandrikov

unread,
Nov 3, 2016, 8:14:26 AM11/3/16
to JaCoCo and EclEmma Users, kees...@gmail.com
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages