“Could not find a valid processor version implementation” with Ant junitreport task

Running some JUnit tests with Ant 1.6.5 gave this error when the <junitreport> task ran:

build.xml:160: The following error occurred while executing this line:
build.xml:367: Could not find a valid processor version implementation
from net.sf.saxon.TransformerFactoryImpl

I know of two possible solutions:

  • Upgrade to using Ant 1.7.0, or
  • Set ANT_OPTS thus:
    declare -x \\
    ANT_OPTS=-Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl

3 Replies to ““Could not find a valid processor version implementation” with Ant junitreport task”

  1. Oh dear, WordPress comments swallow tags in comments. Oh well. What I wrote is that I usually use a <factory> element within the <xslt> task element to get the same effect. Should work with 1.6.5 as well as 1.7.0.
    Cheers, Tony.

  2. I do use the <factory> element with the <xslt> task, but it’s not an option with the <junitreport> task in Ant 1.6.5.

Comments are closed.