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 Verena Lampe <V....@insiders.de> on 2002/11/05 10:09:07 UTC

Problem running the sample

Hi,

I want to use Cactus to test JSP Taglibs.

I use Tomcat 4.0.6, JUnit 3.7, jakarta-cactus-13-1.4 and JavaTM 2 SDK,
Enterprise Edition 1.3.

Trying to install the Cactus samples I modified the build.properties
file.

Starting the deployment with ant tests.all I get an error:

C:\cactus\jakarta-cactus-13-1.4\sample-servlet\build\build.xml:355:
Could not create task of type: junit. Common solutions are to use
taskdef to declare your task, or, if this is an optional task, to put
the optional.jar in the lib directory of your ant installation
(ANT_HOME).

at org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:153)
...

The problem is within the following code:
<target name="tests">

What's wrong?
 

Freundliche Grüße  -  Kind regards

Dr. Verena Lampe
Beraterin
____________________________________________________________________

INSIDERS Consulting GmbH
Wilh.-Th.-Römheld-Str. 18
55130 Mainz
Germany

Internet:  www.insiders.de
Mail:      V.Lampe@insiders.de

Tel:    06131-98210-28
Fax:    06131-98210-11


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


AW: Problem running the sample

Posted by Verena Lampe <V....@insiders.de>.
Hi,

Thanks for your help. I had the optional.jar in my classpath, but not
the junit.jar. Now the sample runs.

Verena

-----Ursprüngliche Nachricht-----
Von: Charlene Mitchell [mailto:charlene_ml@yahoo.co.uk] 
Gesendet: Dienstag, 5. November 2002 13:49
An: Cactus Users List
Betreff: Re: Problem running the sample


Hi,

I don't know if this is the answer to your problem but
I had the same thing recently and it took me ages to
suss it out - I found the answer on the Ant FAQ.
(see
http://jakarta.apache.org/ant/faq.html#delegating-classloader)

Basically, the JUnit and optional jar files need to be
in the classpath when you start Ant - it is not enough
to just have them referenced in your build.xml file.

So, I start Ant as follows and now it works.
java -cp
$JAVA_HOME/lib/tools.jar:../lib/ant.jar:../lib/crimson.jar:../lib/jaxp.j
ar:../lib/optional.jar:../lib/junit.jar

HTH

Charlene

 --- Verena Lampe <V....@insiders.de> wrote: > Hi,
> 
> I want to use Cactus to test JSP Taglibs.
> 
> I use Tomcat 4.0.6, JUnit 3.7, jakarta-cactus-13-1.4
> and JavaTM 2 SDK,
> Enterprise Edition 1.3.
> 
> Trying to install the Cactus samples I modified the build.properties
> file.
> 
> Starting the deployment with ant tests.all I get an
> error:
> 
>
C:\cactus\jakarta-cactus-13-1.4\sample-servlet\build\build.xml:355:
> Could not create task of type: junit. Common
> solutions are to use
> taskdef to declare your task, or, if this is an
> optional task, to put
> the optional.jar in the lib directory of your ant installation
> (ANT_HOME).
> 
> at
>
org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:153)
> ...
> 
> The problem is within the following code:
> <target name="tests">
> 
> What's wrong?
>  
> 
> Freundliche Grüße  -  Kind regards
> 
> Dr. Verena Lampe
> Beraterin
>
____________________________________________________________________
> 
> INSIDERS Consulting GmbH
> Wilh.-Th.-Römheld-Str. 18
> 55130 Mainz
> Germany
> 
> Internet:  www.insiders.de
> Mail:      V.Lampe@insiders.de
> 
> Tel:    06131-98210-28
> Fax:    06131-98210-11
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts http://uk.my.yahoo.com

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problem running the sample

Posted by Charlene Mitchell <ch...@yahoo.co.uk>.
Hi,

I don't know if this is the answer to your problem but
I had the same thing recently and it took me ages to
suss it out - I found the answer on the Ant FAQ.
(see
http://jakarta.apache.org/ant/faq.html#delegating-classloader)

Basically, the JUnit and optional jar files need to be
in the classpath when you start Ant - it is not enough
to just have them referenced in your build.xml file.

So, I start Ant as follows and now it works.
java -cp
$JAVA_HOME/lib/tools.jar:../lib/ant.jar:../lib/crimson.jar:../lib/jaxp.jar:../lib/optional.jar:../lib/junit.jar

HTH

Charlene

 --- Verena Lampe <V....@insiders.de> wrote: > Hi,
> 
> I want to use Cactus to test JSP Taglibs.
> 
> I use Tomcat 4.0.6, JUnit 3.7, jakarta-cactus-13-1.4
> and JavaTM 2 SDK,
> Enterprise Edition 1.3.
> 
> Trying to install the Cactus samples I modified the
> build.properties
> file.
> 
> Starting the deployment with ant tests.all I get an
> error:
> 
>
C:\cactus\jakarta-cactus-13-1.4\sample-servlet\build\build.xml:355:
> Could not create task of type: junit. Common
> solutions are to use
> taskdef to declare your task, or, if this is an
> optional task, to put
> the optional.jar in the lib directory of your ant
> installation
> (ANT_HOME).
> 
> at
>
org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:153)
> ...
> 
> The problem is within the following code:
> <target name="tests">
> 
> What's wrong?
>  
> 
> Freundliche Grüße  -  Kind regards
> 
> Dr. Verena Lampe
> Beraterin
>
____________________________________________________________________
> 
> INSIDERS Consulting GmbH
> Wilh.-Th.-Römheld-Str. 18
> 55130 Mainz
> Germany
> 
> Internet:  www.insiders.de
> Mail:      V.Lampe@insiders.de
> 
> Tel:    06131-98210-28
> Fax:    06131-98210-11
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>