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:
Caused by: java.lang.ExceptionInInitializerError
... 31 more
Caused by: java.lang.IllegalArgumentException: null or corrupt input: out
... 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.