Skipping JaCoCo execution due to missing execution data file.

164 views
Skip to first unread message

bharuka...@gmail.com

unread,
Dec 26, 2018, 4:37:58 AM12/26/18
to JaCoCo and EclEmma Users
Hi,
I am getting "Skipping JaCoCo execution due to missing execution data file" message and Jacoco test report is not generated.

You can have a look on below pom.xml configuration. Can you please help me in identifying the root cause of the problem?


<properties>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.jacoco.reportPath>target/jacoco.exec</sonar.jacoco.reportPath>
<sonar.language>java</sonar.language>
</properties>


<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<forkCount>1</forkCount>
<reuseForks>true</reuseForks>
<argLine>${jacoco.agent.argLine}</argLine>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
<configuration>
<append>true</append>
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<phase>initialize</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>jacoco.agent.argLine</propertyName>
<destFile>target/jacoco.exec</destFile>
</configuration>
</execution>
<execution>
<id>jacoco-report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

Evgeny Mandrikov

unread,
Dec 26, 2018, 12:22:01 PM12/26/18
to JaCoCo and EclEmma Users
Hi,


On Wednesday, December 26, 2018 at 10:37:58 AM UTC+1, bharuka...@gmail.com wrote:
I am getting "Skipping JaCoCo execution due to missing execution data file" message and Jacoco test report is not generated.

You can have a look on below pom.xml configuration. Can you please help me in identifying the root cause of the problem?


Let me ask you a couple of stupid questions:
What supposed to generate this file? JaCoCo agent.
What supposed to run agent? maven-surefire-plugin
How come you expect anyone to guess just by partial snipped of pom.xml what happens during execution of maven-surefire-plugin??? Maybe there is simply no tests to execute?

Message has been deleted

bharuka...@gmail.com

unread,
Dec 27, 2018, 12:36:57 AM12/27/18
to JaCoCo and EclEmma Users
Hi Evgeny Mandrikov,

I am thankful to you for replying on my query. At least it's better to get stupid questions rather than getting none.

To help you further more,

1. The Jacoco is supposed to generate "sites" folder in my target directory which(sites) contains the tests report. I have used the same configuration in my other project modules there it's worked fine for me. However it's not working in 1-2 modules :(

2. When I run "mvn clean install" or "mvn clean verify" or "mvn -U clean install jacoco:report -Dmaven.test.failure.ignore=true" command I can see there are 51 tests executed successfully without any error.

3. I thought not to confuse you with bulky pom.xml but yeah if you need it I can provide it to you for sure.
Message has been deleted
Message has been deleted

bharuka...@gmail.com

unread,
Dec 27, 2018, 12:43:34 AM12/27/18
to JaCoCo and EclEmma Users
On Wednesday, December 26, 2018 at 10:52:01 PM UTC+5:30, Evgeny Mandrikov wrote:
> Hi,
>
> Let me ask you a couple of stupid questions:
>
> What supposed to generate this file? JaCoCo agent.
>
> What supposed to run agent? maven-surefire-plugin
>
> How come you expect anyone to guess just by partial snipped of pom.xml what happens during execution of maven-surefire-plugin??? Maybe there is simply no tests to execute?


I am trying to send you the whole "pom.xml" file but the movement I click on post button the message is getting deleted automatically. Maybe because of it's line size I am unable to send it.

Evgeny Mandrikov

unread,
Dec 27, 2018, 1:07:49 PM12/27/18
to JaCoCo and EclEmma Users


On Thursday, December 27, 2018 at 6:36:57 AM UTC+1, bharuka...@gmail.com wrote:
I am thankful to you for replying on my query. At least it's better to get stupid questions rather than getting none. 

To help you further more, 

     1. The Jacoco is supposed to generate "sites" folder in my target directory which(sites) contains the tests report. I have used the same configuration in my other project modules there it's worked fine for me. However it's not working in 1-2 modules :( 

     2. When I run "mvn clean install" or "mvn clean verify" or "mvn -U clean install jacoco:report -Dmaven.test.failure.ignore=true" command I can see there are 51 tests executed successfully without any error. 

     3. I thought not to confuse you with bulky pom.xml but yeah if you need it I can provide it to you for sure. 

Once again:
"execution data file" that "jacoco:report" uses,
is generated by agent
that is executed during execution of maven-surefire-plugin.

So what prevents you from debugging execution of maven-surefire-plugin to see if it uses agent or not?
Debug log ("mvn -X") will contain

Forking command line: java -javaagent:.../org.jacoco.agent-0.8.1-runtime.jar=destfile=...

during execution of maven-surefire-plugin in case of presence of agent.

Or what prevents you from comparison of executions and configurations of maven-surefire-plugin (working one with non-working)?


On Thursday, December 27, 2018 at 6:43:34 AM UTC+1, bharuka...@gmail.com wrote:
I am trying to send you the whole "pom.xml" file but the movement I click on post button the message is getting deleted automatically. Maybe because of it's line size I am unable to send it.

Then share it on GitHub.

bharuka...@gmail.com

unread,
Dec 28, 2018, 1:04:21 AM12/28/18
to JaCoCo and EclEmma Users
@Evgeny Mandrikov,
I have shared the whole "pom.xml" file on GitHub. Please have a look on it.

I have compared the configuration of "maven-surefire-plugin" and "jacoco plugin" both(working and non-working). I could not see single line of change in both the configurations. That's why I am more concerned about this strange behavior which is working at one place but not at other.

I think you have rightly pointed out that may be "agent" is not executing during "maven-surefire-plugin". I need to check it whether this is the real cause of concern or not.

Evgeny Mandrikov

unread,
Dec 28, 2018, 1:25:37 AM12/28/18
to JaCoCo and EclEmma Users


On Friday, December 28, 2018 at 7:04:21 AM UTC+1, bharuka...@gmail.com wrote:
I have shared the whole "pom.xml" file on GitHub. Please have a look on it.

Once again:
How come you expect anyone to guess just by partial snipped of pom.xml what happens during execution of maven-surefire-plugin???

Having said this, I mean that you need to provide complete example that includes not just pom.xml , but also other code.

And please stop creating useless tickets in our issue tracker.
Create your own GitHub repository instead.

bharuka...@gmail.com

unread,
Dec 28, 2018, 2:39:35 AM12/28/18
to JaCoCo and EclEmma Users

I can understand your viewpoint that it's difficult to guess about the cause from the partial snippet but I too have my hands tied as it's a private/personal code of the organization.


I have observed one new thing while execution of "maven-surefire-plugin" i.e. when I keep forkCount as 0(zero) in my surefire plugin it executes the tests but gives message as "Skipping JaCoCo execution due to missing execution data file".
However, when I give the forkCount as 1 then it gives me the below error,


[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)

Henrik Horneber

unread,
Dec 28, 2018, 4:13:46 AM12/28/18
to jac...@googlegroups.com
Hi,

It looks to me as if you were struggling with basic maven concepts and configuration.

Most of us got pretty much identical configuration up and running just by the documentation alone. (as far as I can tell) 

Please create a stupidly simple example (one maven module, one class, no dependencies, compiles and runs on a vanilla mvn installation) and see if you get that to work. If you don't, please provide the complete example in your own github repo. 

We're pretty much all volunteers here. Please cover the basics before asking for our time and attention. 




Am Fr., 28. Dez. 2018, 08:39 hat <bharuka...@gmail.com> geschrieben:
--
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 jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/ef0919fa-de67-4067-8d98-e6a9ffceff0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

bharuka...@gmail.com

unread,
Dec 28, 2018, 6:55:36 AM12/28/18
to JaCoCo and EclEmma Users
@Henrik Horneber

Thanks for being part of the discussion.

As you have asked me to create a sample example, I did the same and it has worked there.

However, I didn't understand one thing if the same configuration is working on my newly created sample example why the same configuration is not working in my project module?

Evgeny Mandrikov

unread,
Dec 28, 2018, 2:02:18 PM12/28/18
to JaCoCo and EclEmma Users
On Friday, December 28, 2018 at 8:39:35 AM UTC+1, bharuka...@gmail.com wrote:


I have observed one new thing while execution of "maven-surefire-plugin" i.e. when I keep forkCount as 0(zero) in my surefire plugin it executes the tests but gives message as "Skipping JaCoCo execution due to missing execution data file".


Have you ever tried to understand what forkCount zero means?
It means that maven-surefire-plugin won't start new JVM for execution of tests and will run tests inside JVM that executes Maven.
Hence there is no way to set JVM arguments such as "-javaagent".
This is also described in JaCoCo documentation at page https://www.jacoco.org/jacoco/trunk/doc/maven.html :

When using the maven-surefire-plugin you must not use a forkCount of 0 or set the forkMode to never as this would prevent the execution of the tests with the javaagent set and no coverage would be recorded.

On Friday, December 28, 2018 at 8:39:35 AM UTC+1, bharuka...@gmail.com wrote:

However, when I give the forkCount as 1 then it gives me the below error,


[ERROR] The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
[ERROR]         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)

 

On Friday, December 28, 2018 at 12:55:36 PM UTC+1, bharuka...@gmail.com wrote:
However, I didn't understand one thing if the same configuration is working on my newly created sample example why the same configuration is not working in my project module?

As was said to you many times - the reason might be not in configuration, but for example in your tests! And that's why guessing based on just pom.xml is useless!

There are plenty of reasons for the above message, starting from insufficient memory for JVM, including bugs in tests and bugs in JDK, and etc - http://lmgtfy.com/?q=%22The+forked+VM+terminated+without+properly+saying+goodbye.%22
So could you please finally make an effort to properly investigate this before posting your next observation here?

bharuka...@gmail.com

unread,
Jan 2, 2019, 12:28:00 AM1/2/19
to JaCoCo and EclEmma Users
@Evgeny Mandrikov I already read about it at jacoco documentation page and that's the reason I have kept it as 1 in my configuration instead of keeping it as zero.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages