Error Creating Report

6,224 views
Skip to first unread message

Stanley Chong

unread,
Apr 18, 2017, 1:45:26 PM4/18/17
to JaCoCo and EclEmma Users
Hi,
We are trying to use JaCoCo on a Java program that is compiled to machine code.  We can get the jacoco.exec to be created, but when we try to generate the report, we get the following error:

Buildfile: build.xml

 

Report:

[jacoco:report] Loading execution data file /home/s_mrscha/bld24/jacoco.exec

 

BUILD FAILED

/home/s_mrscha/bld24/build.xml:23: Error while creating report

 

Total time: 6 seconds


And line 23 is just the first line of the ant <jacoco:report> task… so that doesn’t seem to be useful.


Is there something else that would enable us to see a more descriptive error so we can fix this problem?


Thanks,

Stan

Marc Hoffmann

unread,
Apr 19, 2017, 4:10:16 AM4/19/17
to jac...@googlegroups.com

Hi Stan,

are you using Ant? In this case please run your build with the Option -v to get more debug information and provide the output.

Also: What version of JaCoCo are you using?

 

Regards,
-marc

On 2017-04-18 19:45, 'Stanley Chong' via JaCoCo and EclEmma Users wrote:

Hi,
We are trying to use JaCoCo on a Java program that is compiled to machine code.  We can get the jacoco.exec to be created, but when we try to generate the report, we get the following error:
 

Buildfile: build.xml

 

Report:

[jacoco:report] Loading execution data file /home/s_mrscha/bld24/jacoco.exec

 

BUILD FAILED

/home/s_mrscha/bld24/build.xml:23: Error while creating report

 

Total time: 6 seconds

 

And line 23 is just the first line of the ant <jacoco:report> task... so that doesn't seem to be useful.

Stanley Chong

unread,
Apr 26, 2017, 1:28:20 PM4/26/17
to JaCoCo and EclEmma Users
I'm working with some guys that are off site for this.  They are using ant.  I believe that they ran it with the -v option.  I will ask them what version of JaCoCo that they are using when they get back from vacation on the 1st of May.  Sorry for the delay!

Balugu Ravindhar

unread,
Apr 27, 2017, 8:18:21 AM4/27/17
to JaCoCo and EclEmma Users
Hi,
Try running ant in debug mode, it could be due to duplicate classes with same package name.
ant -d report

Thanks,
Ravindhar

Stanley Chong

unread,
May 2, 2017, 3:05:36 PM5/2/17
to JaCoCo and EclEmma Users
Here's the info that I get from them.  
They are using Jacoco 0.7.6.  Their errors when they run with the -v option are:

[antlib:org.apache.tools.ant] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.

Parsing buildfile jar:file:/home/s_mrscha/bld24/jacocoant.jar!/org/jacoco/ant/antlib.xml with URI = jar:file:/home/s_mrscha/bld24/jacocoant.jar!/org/jacoco/ant/antlib.xml

 

clean:

  [delete] Deleting directory /home/s_mrscha/bld24/report

 

report:

[antlib:org.jacoco.ant] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.

[jacoco:report] Loading execution data file /home/s_mrscha/bld24/jacoco.exec

 

BUILD FAILED

/home/s_mrscha/bld24/build.xml:23:Error while creating report.


Thanks!

Marc Hoffmann

unread,
May 3, 2017, 3:16:41 AM5/3/17
to jac...@googlegroups.com

Hi,

if you run Ant -v there should be a Java stack trace after the line with "Error while creating report".

Please provide this stack trace for further investigation.

Regards,
-marc

 

 

On 2017-05-02 21:05, 'Stanley Chong' via JaCoCo and EclEmma Users wrote:

Here's the info that I get from them.  
They are using Jacoco 0.7.6.  Their errors when they run with the -v option are:

...

[antlib:org.apache.tools.ant] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.

Parsing buildfile jar:file:/home/s_mrscha/bld24/jacocoant.jar!/org/jacoco/ant/antlib.xml with URI = jar:file:/home/s_mrscha/bld24/jacocoant.jar!/org/jacoco/ant/antlib.xml

...

 

clean:

  [delete] Deleting directory /home/s_mrscha/bld24/report

 

report:

[antlib:org.jacoco.ant] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.

[jacoco:report] Loading execution data file /home/s_mrscha/bld24/jacoco.exec

 

BUILD FAILED

/home/s_mrscha/bld24/build.xml:23:Error while creating report.

 

Thanks!


On Tuesday, April 18, 2017 at 1:45:26 PM UTC-4, Stanley Chong wrote:
Hi,
We are trying to use JaCoCo on a Java program that is compiled to machine code.  We can get the jacoco.exec to be created, but when we try to generate the report, we get the following error:
 

Buildfile: build.xml

 

Report:

[jacoco:report] Loading execution data file /home/s_mrscha/bld24/jacoco.exec

 

BUILD FAILED

/home/s_mrscha/bld24/build.xml:23: Error while creating report

 

Total time: 6 seconds

 

And line 23 is just the first line of the ant <jacoco:report> task... so that doesn't seem to be useful.

 

Is there something else that would enable us to see a more descriptive error so we can fix this problem?

 

Thanks,

Stan

 

--
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/c27112c4-7321-4059-95d3-055b03161a1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Stanley Chong

unread,
May 4, 2017, 2:16:08 PM5/4/17
to JaCoCo and EclEmma Users
Sorry about the time in between.  here is part of the stack trace:

BUILD FAILED

/home/s_mrscha/bld24/build.xml:25:Error while creating report

at org.jacoco.ant.ReportTask.execute(ReportTask.java:501)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

….

….

Caused by: java.io.IOException: Error while analyzing HelloWorld.class.

at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:153)

at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:147)

at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:178)

Caused by: java.lang.IllegalStateException: Class HelloWorld is already instrumented.

At org.jacoco.core.internal.instr.InstrSupport.assertNotInstrumented(InstrSupport.java:94)

… 21 more


On Tuesday, April 18, 2017 at 1:45:26 PM UTC-4, Stanley Chong wrote:

Marc R. Hoffmann

unread,
May 4, 2017, 2:22:27 PM5/4/17
to jac...@googlegroups.com
Hi,

the stack trace points out the problem:


    "Class HelloWorld is already instrumented."

Report generation cannot work on instrumented classes. You need to supply the original classes.

Regards,
-marc

Stanley Chong

unread,
May 4, 2017, 2:50:07 PM5/4/17
to JaCoCo and EclEmma Users
Thank you very much!  That worked!
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages