jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maria Sole Franzin" <mariasole.fran...@allos.it>
Subject testing ejb by ant
Date Wed, 21 May 2003 15:27:12 GMT
Yup! Now it works without the batch file... ;-)
The problem was that I put the cactus-ant-integration.jar inside the
ant_home/lib... perhaps there were some conflicts.... i don't know.

So, now cactifywar works, and also cactus, but i get an error: this is
part of the xml:
<taskdef resource="cactus.tasks">
		<classpath>
			<pathelement
location="${LIB_PATH}/cactus-framework.jar"/>
			<pathelement
location="${LIB_PATH}/cactus-integration-ant-20030515.jar"/>
			<pathelement
location="${LIB_PATH}/commons-httpclient-2.0alpha1-20020720.jar"/>
			<pathelement
location="${LIB_PATH}/commons-logging.jar"/>
			<pathelement path="${java.class.path}"/>
			<pathelement
location="C:\cactus\aspectj\lib\ext\aspectjrt.jar"/>
		</classpath>
	</taskdef>
	
	<target name="testConverter">
		<javac srcdir="${SRC}" destdir="${CLASSES}" debug="on"/>
		<cactifywar srcfile="${BUILD}/cactuswebapp.war"
destfile="${BUILD}/testcactuswebapp.war">
			<!--<servletredirector
mapping="/test/servletRedirector"/>-->  
		</cactifywar>
		<cactus warfile="${BUILD}/testcactuswebapp.war"
printsummary="yes" haltonfailure="no" failureproperty="tests.failed">
			<classpath>
				<path refid="cactus.runtime.classpath"/>
				<pathelement location="${CLASSES}"/>
			</classpath>
			<containerset>
				<tomcat3x dir="${TOMCAT}" port="8080"/>
			</containerset>
			<formatter type="xml"/>
			<batchtest>
				<fileset dir="${SRC}/testcactus">
					<include
name="**/ConverterTest.java"/>
				</fileset>
			</batchtest>
		</cactus>
	</target>

and this is the error (cactifywar works well;-)
ResourceStream for
org/apache/cactus/integration/ant/deployment/resources/web-ap
p_2_2.dtd loaded from ant loader
   [cactus] No mapping of the filter redirector found
   [cactus] No mapping of the JSP redirector found
   [cactus] Adding Cactus system property 'cactus.servletRedirectorName'
with va
lue 'ServletRedirector'
Class org.apache.tools.ant.types.Environment$Variable loaded from parent
loader
   [cactus]
-----------------------------------------------------------------
   [cactus] Running tests against Tomcat 3.x
   [cactus]
-----------------------------------------------------------------
   [cactus] Starting up container
Finding class
org.apache.cactus.integration.ant.container.ContainerRunner
Class org.apache.cactus.integration.ant.container.ContainerRunner loaded
from an
t loader
Class java.net.HttpURLConnection loaded from parent loader
Class java.lang.Runnable loaded from parent loader
Class java.lang.InterruptedException loaded from parent loader
   [cactus] Failed to connect to
http://localhost:8080/testcactuswebapp/ServletR
edirector?Cactus_Service=RUN_TEST
(http://localhost:8080/testcactuswebapp/Servle
tRedirector?Cactus_Service=RUN_TEST)
Class java.lang.Thread loaded from parent loader
Finding class
org.apache.cactus.integration.ant.container.ContainerRunner$1
Class org.apache.cactus.integration.ant.container.ContainerRunner$1
loaded from
ant loader
Class org.apache.tools.ant.types.FilterChain loaded from parent loader
Class org.apache.tools.ant.filters.ReplaceTokens loaded from parent
loader
Class org.apache.tools.ant.filters.ReplaceTokens$Token loaded from
parent loader

   +Task: java
Class org.apache.tools.ant.taskdefs.Java loaded from parent loader
java.lang.NullPointerException
        at
org.apache.tools.ant.types.Environment$Variable.setFile(Environment.j
ava:97)



thanks again!!!!

Mariasole
>Hi Maria,

>[please don't send HTML mails to this list BTW]

>I'm not sure what the problem is, but I'm using the <cactifywar> task
in 
>a couple of places without problems.

>I wonder why you explicitly add the CactifyWarTask.class to the 
>classpath of the <taskdef>, because that class should of course be in 
>the cactus-integration-ant.jar. Also you shouldn't need a batch file at

>all, as the classpath should get correctly setup by Ant. Have you tried

>invoking the script without the Batch file?

>If you run with -debug, do you see a root cause or maybe a message
about 
>a JAR being dropped from the classpath?

>It shouldn't be necessary, but can you try adding the following line to

>the <classpath> of the <taskdef>:

>   <pathelement path="${java.class.path}"/>

>Thanks,
>-chris


Mime
View raw message