无法从提供DomSource的ANT运行TestNG测试用例?

无法从提供DomSource的ANT运行TestNG测试用例?,dom,ant,jar,testng,saxon,Dom,Ant,Jar,Testng,Saxon,我有一个运行testNG testCase的ant任务,但在运行时显示的错误如下 [testng] Error [testng] DOMSource cannot be processed: check that saxon8-dom.jar is on the classpath [testng] [GeneralXMLOutput] [Error] DOMSource cannot be processed: check that saxon8- dom.jar is on th

我有一个运行testNG testCase的ant任务,但在运行时显示的错误如下

 [testng] Error 
 [testng]   DOMSource cannot be processed: check that saxon8-dom.jar is on the classpath
 [testng] [GeneralXMLOutput] [Error] DOMSource cannot be processed: check that saxon8- dom.jar is on the classpath
我的lib文件夹中有jdom-0.7.jar、saxon-8.7.jar、saxonliason.jar,它们与xml相关。这是jar文件依赖冲突吗

如何解决此错误

蚂蚁任务

 <target name="runTests" depends="compile">
    <testng classpath="${test.classpath}:${build.dir}">
        <xmlfileset dir="${basedir}" includes="testng.xml" />
    </testng>
</target>

我在其他一些类中使用了rt.jar中的javax.xml.transform.Transformer api,saxon也使用了Transformer api。(这是什么造成了问题?)


关于,

消息非常清楚:检查saxon8dom是否在类路径上。从你所说的来看,不是


但是Saxon 8.7是一个古老的版本,目前的版本是9.4。最近的版本在主JAR文件中包含了DOM支持—过去将其分开的原因是DOM API在JDK 1.4和JDK 1.5之间发生了不兼容的变化,而当Saxon放弃对JDK 1.4的支持时,这个问题就消失了。

消息非常清楚:检查saxon8 DOM是否在类路径上。从你所说的来看,不是

但是Saxon 8.7是一个古老的版本,目前的版本是9.4。最近的版本在主JAR文件中包含了DOM支持——过去之所以将其分开是因为DOM API在JDK1.4和JDK1.5之间发生了不兼容的变化,而当Saxon放弃对JDK1.4的支持时,这个问题就消失了