Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Clover for Ant raises "Error finalising instrumentation"

The project will build and test fine without clover via ant clean build unittests. However, when try to integrate clover via ant -lib ejb-3.7.1.jar with.clover build unittests clover.report it ends up returning "Error finalising instrumentation" and the following stack trace:

clover Error finalising instrumentation:
clover java.io.IOException: Failed to move tmp registry file /myproject/.clover/clover3_1_6.db.tmp to final registry filejava.io.IOException: Failed to move tmp registry file /myproject/.clover/clover3_1_6.db.tmp to final registry file
clover at com.atlassian.clover.registry.format.FreshRegFile.saveImpl(FreshRegFile.java:117)
clover at com.atlassian.clover.registry.format.FreshRegFile.saveImpl(FreshRegFile.java:18)
clover at com.atlassian.clover.registry.format.RegFile.save(RegFile.java:38)
clover at com.cenqua.clover.registry.Clover2Registry.saveAndOverwriteFile(Clover2Registry.java:268)
clover at com.cenqua.clover.registry.Clover2Registry.saveAndOverwriteFile(Clover2Registry.java:244)
clover at com.atlassian.clover.instr.java.Instrumenter.endInstrumentation(Instrumenter.java:289)
clover at com.atlassian.clover.instr.java.Instrumenter.endInstrumentation(Instrumenter.java:280)
clover at org.apache.tools.ant.taskdefs.CloverCompilerAdapter.setJavac(CloverCompilerAdapter.java:226)
clover at com.mycompany.ant.taskdefs.YJavaC.compile(Unknown Source)
clover at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:930)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
clover at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
clover at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
clover at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
clover at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
clover at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at net.sf.antcontrib.logic.OutOfDate.execute(OutOfDate.java:457)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
clover at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
clover at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
clover at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
clover at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
clover at java.lang.reflect.Method.invoke(Method.java:616)
clover at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
clover at org.apache.tools.ant.Task.perform(Task.java:348)
clover at org.apache.tools.ant.taskdefs.Parallel$TaskRunnable.run(Parallel.java:435)
clover at org.apache.tools.ant.taskdefs.Parallel$TaskRunnable.run(Parallel.java:435)
clover at java.lang.Thread.run(Thread.java:679)
clover java.io.IOException: Failed to move tmp registry file /myproject/.clover/clover3_1_6.db.tmp to final registry file
clover ** Error(s) occurred and the instrumentation process can't continue.

It seems clover is doing its thing during the build because I see lines like this frequently in the log:

javac Compiling 205 source files to /myproject/classes
clover Updating existing database at '/myproject/.clover/clover3_1_6.db'.
clover Clover all over. Instrumented 2 files (1 package).
clover Elapsed time = 0.005 secs. (400 files/sec, 12,800 srclines/sec)
clover Processing files at 1.6 source level.

1 answer

1 accepted

1 vote
Answer accepted

The exception:

[clover] Error finalising instrumentation:
[clover] java.io.IOException: Failed to move tmp registry file 
/myproject/.clover/clover3_1_6.db.tmp to final registry file

means that Clover was unable to rename file from '/myproject/.clover/clover3_1_6.db.tmp' to '/myproject/.clover/clover3_1_6.db'. This kind of error is usually thrown when a parallel build is configured (by a <parallel> task, for instance).

Clover currently does not support parallel compilation, so you have to disable it in your build.

Regards
Marek

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

172 views 2 9
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you