You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Wei Hsu <wh...@openharbor.com> on 2004/01/30 02:12:34 UTC
LinkageError with org.w3c.dom.Document when testing EJB's
Hi all,
I am trying to use Cactus to test EJB's from Ant. I managed to get the
cactus task to successfully run my tests, but it works only if I set the
formatter type to either "plain" or "brief". When I try to use "xml" mode,
however, I get the following error:
--------------------------
java.lang.LinkageError: loader constraints violated when linking
org/w3c/dom/Document class
at
org.apache.crimson.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Docume
ntBuilderFactoryImpl.java:82)
at
org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.getDocu
mentBuilder(XMLJUnitResultFormatter.java:93)
at
org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter.startTe
stSuite(XMLJUnitResultFormatter.java:138)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.fireStartTestSu
ite(JUnitTestRunner.java:445)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRu
nner.java:279)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask
.java:848)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav
a:556)
at
org.apache.cactus.integration.ant.CactusTask.executeInContainer(CactusTask.j
ava:465)
at
org.apache.cactus.integration.ant.CactusTask.execute(CactusTask.java:229)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
------------------------------
My Configurations are as follows:
- ant 1.5.3-1
- weblogic 7
- cactus 1.5
- j2sdk1.3.1
I've included parts of my build file below. I'd appreciate any help. Thanks!
-Wei
-------------------
<path id="cactus.classpath">
<pathelement location="${aspectjrt.jar}"/>
<pathelement location="${cactus.jar}"/>
<pathelement location="${cactus.ant.jar}"/>
<pathelement location="${commons.httpclient.jar}"/>
<pathelement location="${commons.logging.jar}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="classes_oh" />
<pathelement location="lib/j2ee.jar" />
<pathelement location="lib/DocEjb.jar" />
</path>
<target name="test">
<cactus warfile="${testjar.name}" printsummary="yes"
failureproperty="tests.failed">
<classpath>
<path refid="cactus.classpath"/>
</classpath>
<containerset>
<weblogic7x dir="c:/apps/depot/weblogic/7.0.2.0/weblogic700"
port="9158"/>
</containerset>
<formatter type="xml"/>
<batchtest>
<fileset dir="classes_oh">
<include name="**/*Test.class"/>
</fileset>
</batchtest>
</cactus>
</target>
<target name="war_oh" description="Generate the runtime war">
<war warfile="${testjar.name}" webxml="files/web.xml">
<classes dir="classes_oh"/>
<lib file="${cactus.jar}"/>
<lib file="${junit.jar}"/>
<lib file="${aspectjrt.jar}"/>
<lib file="${commons.logging.jar}"/>
<lib file="lib/DocEjb.jar"/>
<lib file="${commons.httpclient.jar}"/>
<fileset file="files/cactus-report.xsl"/>
</war>
</target>