Ant parallel execution – Error with emma code coverage

In our project we tried to run ant tasks in parallel. We were parallelizing emma code coverage task with some other independent build tasks.
At that time we were getting this error:

../project/build.xml:157: java.lang.ExceptionInInitializerError
Caused by: java.lang.ExceptionInInitializerError
at com.vladium.emma.instr.instrTask.execute(
at com.vladium.emma.emmaTask.execute(
... 31 more
Caused by: java.lang.IllegalArgumentException: null or corrupt input: out
at com.vladium.logging.Logger.create(
at com.vladium.logging.Logger.(
... 39 more

On analysing this we found a open defect in emma which is linked here:

Then on further debugging it, I found that the code in some of the logging portion in ant is obtaining locks and releasing it. Then we found out that the defect is in ant. We were running ant 1.7.1 at that time. I upgraded the ant to 1.8.1 and it solved the problem.

In ant 1.8.1, the locks which were obtained and released in logging was removed and an advanced lockless way of logging was introduced.

I hope this is useful for others debugging this issue.


One thought on “Ant parallel execution – Error with emma code coverage

  1. Many thanks for this tip – this was causing major headaches for me.

    An additional note – I found it quite hard to rebuild emma on a system with a new default java and ant installation – before you go down this route, check out the “emma” package in the Fedora repository (f.e. by searching it on This package contains the patched jars already, dated back to Apr 25, 2008. While this patch _should_ have also landed in JPackage’s noarch rpm for emma, its unfortunately not, so the Fedora rpm is the best choice so far.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s