[java code coverage] Re: “IllegalStateException: Incompatible execution data for class in…” exception from Jacoco when run fo

2016-10-29 Thread Evgeny Mandrikov
What means "no data in it"? It doesn't show any files? or it shows 0 for 
all files?

On Wednesday, October 26, 2016 at 2:17:32 PM UTC+2, Keshaw Pandey wrote:
>
>
> 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?
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/7e66c096-8cfe-4ce9-bd39-797f419b6904%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] EOFException on readExecutionData

2016-10-29 Thread Evgeny Mandrikov
Hi,

You can switch output mode from file to tcpserver or tcpclient to obtain 
dump prior to killing of JVM.
Or set jmx option to true to activate mbean and using it request dump into 
file prior to killing of JVM.
Description of those options can be found at 
http://www.eclemma.org/jacoco/trunk/doc/agent.html

Hope this helps.

On Friday, October 28, 2016 at 10:17:28 PM UTC+2, tc0...@gmail.com wrote:
>
> Is there a configuration to make JaCoCo more tolerant to non-graceful 
> shutdown? We have a some crash recovery tests which forcibly kill JVM 
> processes on purpose.
>
> On Friday, October 28, 2016 at 8:43:07 AM UTC-7, Marc R. Hoffmann wrote:
> > Hi,
> > 
> > this means exec file is truncated somewhere in the middle. Typical cause 
> > for this is non-graceful shutdown of the JVM running the tests.
> > 
> > Cheers,
> > -marc
> > 
> > On 28.10.16 09:14, tc0...@gmail.com wrote:
> > > Hi,
> > >
> > > JaCoCo is randomly failing when it generates the report. Sometimes 
> EOFException is thrown on readExecutionData(). This happens randomly and 
> more often on Travis, and rarely on local dev box.
> > > I'm pretty new to JaCoCo. Would someone show me the best way to debug 
> this?
> > >
> > > This doesn't happen that often when I was using 0.7.5.201505241946.
> > >
> > > Stacktrace:
> > > [ERROR] Failed to execute goal 
> org.jacoco:jacoco-maven-plugin:0.7.7.201606060606:report-aggregate 
> (jacoco-report) on project livy-coverage-report: An error has occurred in 
> JaCoCo Aggregate report generation. Error while creating report: null: 
> EOFException -> [Help 1]
> > > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to 
> execute goal 
> org.jacoco:jacoco-maven-plugin:0.7.7.201606060606:report-aggregate 
> (jacoco-report) on project livy-coverage-report: An error has occurred in 
> JaCoCo Aggregate report generation.
> > > ...
> > > Caused by: java.io.EOFException
> > > at java.io.DataInputStream.readByte(DataInputStream.java:267)
> > > at 
> org.jacoco.core.internal.data.CompactDataInput.readBooleanArray(CompactDataInput.java:63)
> > > at 
> org.jacoco.core.data.ExecutionDataReader.readExecutionData(ExecutionDataReader.java:149)
> > > at 
> org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReader.java:115)
> > > at 
> org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:92)
> > > at 
> org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
> > > at 
> org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:73)
> > > at 
> org.jacoco.maven.ReportSupport.loadExecutionData(ReportSupport.java:87)
> > > at 
> org.jacoco.maven.ReportAggregateMojo.loadExecutionData(ReportAggregateMojo.java:116)
> > > at 
> org.jacoco.maven.ReportAggregateMojo.loadExecutionData(ReportAggregateMojo.java:109)
> > > at 
> org.jacoco.maven.AbstractReportMojo.executeReport(AbstractReportMojo.java:177)
> > > ... 22 more
> > > Travis build log:
> > > https://travis-ci.org/hdinsight/livy/jobs/171299465
> > >
> > > POM file:
> > > 
> https://github.com/hdinsight/livy/blob/de9a35e39508bc05297ccdd90c60bc05cd72cf51/pom.xml
> > >
> > > Thanks!
> > > Alex
> > >
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/42bc3e40-9d06-4c99-a2f0-8a0a57dd1f0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] default lifecycle phase of jacoco:prepare-agent

2016-10-29 Thread Mirko Friedenhagen
Hello,

you mean skip when maven.test.skip is set?
You may achieve this easily by referencing this property in the
default-prepare-agent execution. There you may easily redefine the bound
phase as well.

I use jacoco in projects which have no tests run by surefire or failsafe
but the invoker plugin, so this could break my use case :-).
Regards
Mirko
-- 
Sent from my mobile

Am 29.10.2016 12:15 schrieb :

> Hello list,
>
> sorry if this has been already discussed. I just came across this and I'm
> not sure to understand it fully.
>
> I wonder why the jacoco:prepare-agent maven goal is bound to the very
> early lifecycle phase "initialize"? Wouldn't be a later phase be more
> reasonable?
>
> I assume in most cases this does not matter - nevertheless I've a nested
> multi module maven project here which breaks because the inherited
> "prepare-agent" needs to be evaluated so early and maven misses to find
> dependent modules.
>
> One 2nd thing, would it be possible to automatically ignore the
> "prepare-agent" if tests are skipped?
>
> Thanks for feedback,
>
> Kind Regards, Andreas.
>
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jacoco/0f162cb6-a604-4e85-b2bb-7d9cbf20a6d6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/CAK8jvqz6ssmOp2_rokktu%2B_BzvpMpyWmdNsSYSYuHKGvRepBAA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[java code coverage] default lifecycle phase of jacoco:prepare-agent

2016-10-29 Thread andreas . mandel
Hello list,

sorry if this has been already discussed. I just came across this and I'm not 
sure to understand it fully.

I wonder why the jacoco:prepare-agent maven goal is bound to the very early 
lifecycle phase "initialize"? Wouldn't be a later phase be more reasonable? 

I assume in most cases this does not matter - nevertheless I've a nested multi 
module maven project here which breaks because the inherited "prepare-agent" 
needs to be evaluated so early and maven misses to find dependent modules.

One 2nd thing, would it be possible to automatically ignore the "prepare-agent" 
if tests are skipped?

Thanks for feedback,

Kind Regards, Andreas.


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/0f162cb6-a604-4e85-b2bb-7d9cbf20a6d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.