Hi ,
Please try this one,
Add tools.jar to Ant runtime. Windows=> preference=>Ant=>Runtime add
tools.jar which one eclipse using, if the versions of JDK is different it
will cause someoher problem.
if you want to use JUNIT form Ant script add JUnit.jar also to this
runtime.
Hope this may help, best of luck.
[EMAIL PROTECTED]
27/01/2004 09:05 PM
Please respond to
"Cactus Users List" <[EMAIL PROTECTED]>
To
[EMAIL PROTECTED]
cc
Subject
problem running cactus from ant
Hi all,
I have the following targets in my Ant build file:
<target name="ear.cactify">
<taskdef resource="cactus.tasks">
<classpath>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
<cactifywar version="2.3" destfile="${dist.dir}/cactus.war"
mergewebxml="${depl.desc.dir}/cactus/web.xml">
<classes dir="${build.class.dir}">
<include name="**/*Test.class"/>
</classes>
</cactifywar>
<echo message="hiero"/>
<ear update="true" destfile="${dist.dir}/${ear.name}"
appxml="${depl.desc.dir}/cactus/application.xml">
<fileset dir="${dist.dir}">
<include name="cactus.war"/>
</fileset>
</ear>
</target>
<target name="test" depends="ear.cactify">
<cactus earfile="${dist.dir}/${ear.name}" fork="yes"
printsummary="yes" haltonerror="true"
haltonfailure="true">
<containerset>
<jboss3x dir="${jboss.dist.dir}"
output="jbossresult.txt"/>
</containerset>
<formatter type="brief" usefile="false"/>
<test name=
"nl.informatiefabriek.mtb.persistence.mapping.MappingTest"/>
<classpath>
<pathelement location="${build.class.dir}"/>
</classpath>
</cactus>
</target>
When I run the 'test' target I get the following exception:
test:
[cactus]
-----------------------------------------------------------------
[cactus] Running tests against JBoss 3.2.3
[cactus]
-----------------------------------------------------------------
[cactus] Couldn't find tools.jar (needed for JSP compilation)
You must either set location or path on <pathelement>
at org.apache.tools.ant.types.Path.list(Path.java:309)
at org.apache.tools.ant.types.Path.list(Path.java:320)
at org.apache.tools.ant.types.Path.addExisting(Path.java:260)
at org.apache.tools.ant.types.Path.concatSystemClasspath(Path.java:551)
at
org.apache.tools.ant.types.CommandlineJava.size(CommandlineJava.java:346)
at
org.apache.tools.ant.types.CommandlineJava.getCommandline(CommandlineJava.java:248)
at
org.apache.tools.ant.types.CommandlineJava.describeCommand(CommandlineJava.java:311)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:138)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at
org.apache.cactus.integration.ant.container.jboss.JBoss3xContainer.startUp(JBoss3xContainer.java:232)
at
org.apache.cactus.integration.ant.container.ContainerRunner$1.run(ContainerRunner.java:179)
at java.lang.Thread.run(Unknown Source)
BUILD FAILED:
file:C:/eclipse/eclipse/workspace/mtb_persistence_framework/src/build/cactus/build.xml:56:
Failed to start the container after more than [180000] ms. Trying to
connect to the
[http://localhost:8080/test/ServletRedirector?Cactus_Service=RUN_TEST]
test URL yielded a [-1] error code. Please run in debug mode for more
details about the error.
Total time: 3 minutes 4 seconds
I run ant from Eclipse (and tools.jar).
Can somebody please help me to get me going with Cactus?
Thanks,
Regards,
Harm de Laat
Informatiefabriek
The Netherlands