jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Where to find org.apache.cactus.unit.TestAll ?
Date Thu, 15 Aug 2002 16:47:48 GMT
Hi Markus,

Yes, you're right. I read too fast the exception ... Ok, several points,
see below.

> -----Original Message-----
> From: Markus Joschko [mailto:jocsch@phreaker.net]
> Sent: 15 August 2002 17:46
> To: Cactus Users List
> Subject: AW: Where to find org.apache.cactus.unit.TestAll ?
> 
> Which <classpath> elements do you mean? The one of the junit task?
> Shouldn't
> this be more than sufficient ? But why should I look for the
junit.jar?
> There is the org.apache.cactus.unit.TestAll class not included ...
> 

??

TestAll is to be provided by you ... Actually you don’t even need one,
it's up to you really. In any case, it has nothing to do with the Cactus
framework. Cactus Sample provides one but that's for its sample; it is
not a feature of the core.

> <junit printsummary="yes" haltonfailure="yes" haltonerror="yes"
>             fork="yes">
> 
>             <classpath>
>                 <!-- Cactus.propertie and log_client.properties need
to be
> in
>                      the classpath -->
>                 <pathelement
> location="/xxx/jakarta-cactus-13-1.4b1/test/cactus.properties"/>

??

This is wrong. Putting a file in the classpath means putting the
directory where it is located in the classpath or the file name *if* it
is a jar or zip.

>                 <pathelement
> location="/xxx/jakarta-cactus-13-1.4b1/test/WEB-INF/classes"/>
>                 <pathelement
location="/xxx/jakarta-cactus-13-1.4b1/lib"/>

??

What's inside lib/ ? Jars ? If so, you should know that you need to
explicitely put the jar name in the classpath ...

>                 <pathelement
> location="/xxx/jakarta-cactus-13-1.4b1/test/cactus.properties"/>

Why do you add it twice ?

>                 <pathelement
location="{$ANT_HOME}/lib/junit-3.7.jar"/>

I believe this is a typo. {$ANT_HOME) <--> ${ANT_HOME} ...

> 
>                  <fileset dir="/xxx/jakarta-cactus-13-1.4b1/lib">
> 		     		<include name="**/*.jar"/>
> 		 	</fileset>

ahhh. That's better ... But why do you put lib/ in the classpath ? It is
very unusual.

> 
>                 <path refid="project.class.path"/>
>             </classpath>
> 
>             <formatter type="plain" usefile="false"/>
> 
>             <!-- Note: The unit tests must be run first. See
>                  org.apache.cactus.unit.TestAll for details -->
>             <test name="org.apache.cactus.unit.TestAll"/>
>             <test name="org.apache.cactus.sample.TestAll"/>

Are you running the Cactus samples ? If so, everything is ready and
packages in the Cactus distribution you have downloaded.

> 
>         </junit>
> 
> ??

-Vincent

> 
> -----Ursprüngliche Nachricht-----
> Von: Vincent Massol [mailto:vmassol@octo.com]
> Gesendet: Donnerstag, 15. August 2002 18:19
> An: 'Cactus Users List'
> Betreff: RE: Where to find org.apache.cactus.unit.TestAll ?
> 
> 
> Ok. Second possibility then:
> 
> Do you have junit.jar in your client side classpath (i.e. in the
> <classpath> elements in your build.xml) ? I would bet that you use
> 'fork="true"' for the <junit> task, right ? :-) If so, a new JVM a
> started and thus you need to put junit.jar in your classpath.
> 
> Cheers,
> -Vincent
> 
> > -----Original Message-----
> > From: Markus Joschko [mailto:jocsch@phreaker.net]
> > Sent: 15 August 2002 17:23
> > To: Cactus Users List
> > Subject: AW: Where to find org.apache.cactus.unit.TestAll ?
> >
> > I put junit-3.7.jar delivered with cactus in my $ANT_HOME/lib.
> Elsewhere
> > the
> > junit task wouldn't run....
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Vincent Massol [mailto:vmassol@octo.com]
> > Gesendet: Donnerstag, 15. August 2002 16:44
> > An: 'Cactus Users List'
> > Betreff: RE: Where to find org.apache.cactus.unit.TestAll ?
> >
> >
> > Markus,
> >
> > You need junit.jar in your ANT_HOME/lib directory.
> >
> > -Vincent
> >
> > > -----Original Message-----
> > > From: markus.joschko@web.de [mailto:markus.joschko@web.de]
> > > Sent: 15 August 2002 15:09
> > > To: cactus-user@jakarta.apache.org
> > > Subject: Where to find org.apache.cactus.unit.TestAll ?
> > >
> > > Hi,
> > > I hope that's one of the easier questions for you. I'm new to
cactus
> > and
> > > tried to test a sample servlet with the ant junit task (ant1.4). I
> > didn't
> > > use a provided sampleconfiguration because my web container is
jetty
> > build
> > > in into jboss. During my test following error occurs:
> > >
> > > test:
> > >     [junit] Running org.apache.cactus.unit.TestAll
> > >     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0
> sec
> > >     [junit] Testsuite: org.apache.cactus.unit.TestAll
> > >     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0
> sec
> > >     [junit]
> > >     [junit]     Caused an ERROR
> > >     [junit] org.apache.cactus.unit.TestAll
> > >     [junit] java.lang.ClassNotFoundException:
> > > org.apache.cactus.unit.TestAll
> > >     [junit]     at
> > java.net.URLClassLoader$1.run(URLClassLoader.java:198)
> > >     [junit]     at
> java.security.AccessController.doPrivileged(Native
> > > Method)
> > >     [junit]     at
> > > java.net.URLClassLoader.findClass(URLClassLoader.java:186)
> > >     [junit]     at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> > >     [junit]     at
> > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
> > >     [junit]     at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:262)
> > >     [junit]     at
> > > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
> > >     [junit]     at java.lang.Class.forName0(Native Method)
> > >     [junit]     at java.lang.Class.forName(Class.java:130)
> > >     [junit]     at
> > >
> >
>
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUni
> > tT
> > > es
> > > tRunner.java:171)
> > >     [junit]     at
> > >
> >
>
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUni
> > tT
> > > es
> > > tRunner.java:156)
> > >     [junit]     at
> > >
> >
>
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitT
> > es
> > > tR
> > > unner.java:407)
> > >     [junit]
> > >
> > > BUILD FAILED
> > >
> > > OK, no problem. I think it's a typical classpath problem and so I
> > tried to
> > > find the jar in which the class is included (because I thought
that
> I
> > have
> > > included every delivered jar file) ..... but I can't find anyone.
> > Maybe
> > > I'm
> > > blind or to dump. Can you please tell me the jar in which the
class
> is
> > > included?
> > >
> > > Thanks,
> > >  Markus
> > >
> > > P.S.: That's my junit task:test:
> > >
> > >  <target name="test">
> > >         <junit printsummary="yes" haltonfailure="yes"
> > haltonerror="yes"
> > >             fork="yes">
> > >
> > >             <classpath>
> > >                 <!-- Cactus.propertie and log_client.properties
need
> > to be
> > > in
> > >                      the classpath -->
> > >                 <pathelement
> > > location="/home/markus/downloads/jakarta-cactus-13-
> > > 1.4b1/test/cactus.propert
> > > ies"/>
> > >                 <pathelement
> > > location="/home/markus/downloads/jakarta-cactus-13-1.4b1/test/WEB-
> > > INF/classe
> > > s"/>
> > >                 <pathelement
> > > location="/home/markus/downloads/jakarta-cactus-13-1.4b1/lib"/>
> > >
> > >           <!-- <fileset
> > >
> >
>
dir="/home/markus/downloads/jakarta-cactus-13-1.4b1/test/WEB-INF/classes
> > ">
> > > 		     		<include name="**/*"/>
> > > 		 		</fileset>
> > >
> > > 	 		    <fileset
> > dir="/home/markus/downloads/jakarta-cactus-
> > > 13-1.4b1/lib">
> > > 		     		<include name="**/*.jar"/>
> > > 		 		</fileset>-->
> > >
> > >                 <path refid="project.class.path"/>
> > >             </classpath>
> > >
> > >             <formatter type="plain" usefile="false"/>
> > >
> > >             <!-- Note: The unit tests must be run first. See
> > >                  org.apache.cactus.unit.TestAll for details -->
> > >             <test name="org.apache.cactus.unit.TestAll"/>
> > >             <test name="org.apache.cactus.sample.TestAll"/>
> > >
> > >         </junit>
> > >
> > >     </target>
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:   <mailto:cactus-user-
> > > unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail: <mailto:cactus-user-
> > > help@jakarta.apache.org>
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:cactus-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:cactus-user-help@jakarta.apache.org>
> >
> >
> >
> > --
> > To unsubscribe, e-mail:   <mailto:cactus-user-
> > unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:cactus-user-
> > help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:cactus-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:cactus-user-help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message