Are source files mandatory for clover-report


I am getting error when running clover-report, like:

[clover-report] Failed to render syntax highlights for /home/ta230208/TeamCity_Agent_Space/sdvsue800/TeamCity-Agents/ta230208/work/47becb009e2f5761/Commons/src/java/com/teradata/datamovement/model/

[clover-report] /home/ta230208/TeamCity_Agent_Space/sdvsue800/TeamCity-Agents/ta230208/work/47becb009e2f5761/Commons/src/java/com/teradata/datamovement/model/ (No such file or directory) /home/ta230208/TeamCity_Agent_Space/sdvsue800/TeamCity-Agents/ta230208/work/47becb009e2f5761/Commons/src/java/com/teradata/datamovement/model/ (No such file or directory)

[clover-report]         at Method)

[clover-report]         at<init>(

[clover-report]         at<init>(

[clover-report]         at com.cenqua.clover.registry.FileInfo.getSourceReader(

[clover-report]         at com.cenqua.clover.reporters.html.source.SourceRenderHelper.getChecksummingReader(

[clover-report]         at com.cenqua.clover.reporters.html.source.SourceRenderHelper.render(

[clover-report]         at com.cenqua.clover.reporters.html.source.SourceRenderHelper.gatherSrcRenderInfo(

[clover-report]         at com.cenqua.clover.reporters.html.source.SourceRenderHelper.insertLineInfosForFile(

[clover-report]         at com.cenqua.clover.reporters.html.RenderFileAction.insertLineInfos(

[clover-report]         at com.cenqua.clover.reporters.html.RenderFileAction.render(

[clover-report]         at

[clover-report]         at com.cenqua.clover.util.CloverExecutors$

[clover-report]         at

[clover-report]         at

[clover-report]         at$

[clover-report]         at

[clover-report] /home/ta230208/TeamCity_Agent_Space/sdvsue800/TeamCity-Agents/ta230208/work/47becb009e2f5761/Commons/src/java/com/teradata/datamovement/model/ (No such file or directory)

I believe this is due instrumented source files not found, right?
My question is whether is it manadatory to have source files when running clover-report? Will my coverage percentage increase if I include source files? Right now getting only 4% for a test but as told by developer it should be above 30%.
My build server is different than test server, still can I give source path? Packages (java) directory structure would be same but the location will be different.
Thanks in advance.

3 answers

1 accepted

0 vote

Right now getting only 4% for a test but as told by developer it should be above 30%. My build server is different than test server [...]?

If coverage is lower that expected then it must be something wrong in your environment/build setup. There are many possibilities how to configure Clover for builds on mutiple machines. See:

Questions worth answering:

  • which configuration would fit best to your environment as per the Decision Matrix?
  • do you use relative or absolute initstring for clover database(s)?
  • have you copied clover database(s) from a build server to a test server or are they accessible through a shared network drive?
  • is there a need to use -Dclover.initstring or -Dclover.initstring.basedir property on a test sever (see manual above)?
  • do you have clover.jar deployed on test server (for instance in an application sever's /lib directory; depends on what kinds of tests do you run)?
  • do you see coverage recording files produced on the test server in the directory where clover.db is located?

Actually my product has three components, one can be said as client and other two are servers. They all communicate through a message queue (MQ). Now the issue is I am getting coverage for only client code, I am not able to see any coverage for servers code and that's why my coverage is very low. I have instrumented code for all three components and a coverage.db file.

Can you please let me know how can I get coverage info of those codes as well?

I suggest a following lecture:


Shortly speaking, you have to ensure that:

* Clover database (clover.db) is available from your application server - either use an absolute path for initstring (assuming that build server and test server is the same machine) or provide a -Dclover.inistring JVM option for server's JVM

* Clover runtime JAR (clover.jar) is available in classpath - the easiest way is to put it into <server_dir>/lib directory, so that Clover becomes available for all applications deployed on a server

I suggest checking server's logs whether they contain any Clover-related messages - they shall be present in case of problems mentioned above. You can also run an application server with -Dclover.logging.level=debug to get even more details.


Hi Marek,

That's the problem build server and test server can't be same. :(

Can we give any URL kind of option in clover ant task so that .db can be accessed via other two components?

Thanks again.

You can't use URL. Instead of this, just copy the Clove database from a build server to a test server and point to a new db location on that machine by passing the -Dclover.initstring=/path/to/clover.db JVM option.

0 vote

It's not mandatory to include sources in the HTML report. Lack of sources does not decrease code coverage either.

You can use <clover-report> with srcLevel=false to skip source page rendering:

  &lt;current outfile="clover_html"&gt;
    &lt;format type="html" srcLevel="false"/&gt;

You can also use <clover-report> with <sourcepath> option to point to a different location of sources:

  &lt;current outfile="clover_html"&gt;
    &lt;format type="html"/&gt;
      &lt;pathelement path="/some/other/location"/&gt;

Yes part of the problem solved, thanks.

Marek, just to be clear, the clover.license file must be in all the same places that the clover.jar is. So, if you put clover.jar in your application server's lib directory, a copy of the license file has to go there as well.

Not really ... The clover.license is required for code instrumentation and for report generation. License key is not required to run instrumented application and record coverage files.

Excerpt from

A Clover machine is defined as a single physical computer that Clover is used on to instrument source code or generate coverage reports [...]

See also:

Suggest an answer

Log in or Join to answer
Community showcase
Jason Wong
Published yesterday in Agility Beta

Welcome to agility

Every team in the world is unique, and so   Atlassian believes   that each and every team's best way of working  needs to  be molded to their unique circumstances  – ...

326 views 6 15
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot