Let's come back to the basics of how everything works:

source file is compiled into non-instrumented class file
non-instrumented class file is instrumented (either pre-instrumented 
offline, or automatically at runtime by Java agent)
execution of instrumented classes collected into exec file
report decorates source files with information obtained from analysis of 
exec file and original non-instrumented class files

Message "Classes ... do no match with execution data." during generation of 
report means that class files used for generation of report are not the 
same as classes prior to instrumentation. Why match is important? Because 
otherwise there is no guarantee that what was analyzed matches the sources 
that were compiled.

"classdumpdir" allows to capture classes that were seen by agent prior to 
instrumentation.

Following the above sentences, if without "classdumpdir" there were 
messages about missmatch, then it is strange to expect that analysis of 
classes obtained with "classdumpdir" will match the sources and will not be 
weird.

So the main question that you should answer to solve your difficulties - 
what in your setup/configuration causes this mismatch?

As a helper: HTML report has Sessions page (link on the top-right corner) 
that displays ids of classes (obtained from exec file) prior to 
instrumentation. You can use them for comparison with classes on your disk 
that you try to use for generation of a report.

All in all: please take time to digest documentation and information in 
this thread to understand how things work and to pinpoint what is causing 
troubles in your environment/scenario instead of trying things randomly and 
rushing with questions.

If all this information is not enough, then please provide minimalistic, 
compilable, *complete* and easily runnable example demonstrating your issue.


On Thursday, June 29, 2017 at 3:22:44 PM UTC+2, JococoUser wrote:
>
> Thanks Evgeny !
>
> I am able to generate report now using "classdumpdir" , but report is only 
> showing coverage for static blocks .
> Any pointer why it may be so .
>
> Regards
> Neha
>
> On Thu, Jun 29, 2017 at 12:50 PM, Evgeny Mandrikov <[email protected]> 
> wrote:
>
>>
>>
>> On Thursday, June 29, 2017 at 8:09:33 AM UTC+2, JococoUser wrote:
>>>
>>> Thanks for this info , Evgeny .
>>>
>>> I made the change , and now using maven-antrun-plugin to add class files 
>>> , and now I see them included .
>>>
>>> However , even though I am giving classfiles extracted from same .war 
>>> file that has been deployed and used during execution , I am getting error 
>>> message : "Classes in bundle 'Jacocoreport' do no match with execution 
>>> data. For report generation the same class files must be used as at 
>>> runtime.  " 
>>> Any clue why I am getting this ?
>>>
>>
>> Read documentation about class ids - 
>> http://www.jacoco.org/jacoco/trunk/doc/classids.html
>>
>>  
>>
>>> Also , when I pass on path to .war file directly ( as <file file = ""/> 
>>> )  instead of extracting classes and pointing to them , I am getting error 
>>> message : Error while creating report .
>>>
>>  
>> Run build in verbose mode to see the underlying exception.
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "JaCoCo and EclEmma Users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/jacoco/5IqM4AibmT8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jacoco/bddaf777-d54a-4306-b9c1-98e33b9c1d68%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jacoco/bddaf777-d54a-4306-b9c1-98e33b9c1d68%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/48323191-9888-4a3b-870d-45dc59bf7c52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to