Vincent,

No luck with that. I believe (IMHO) I've tried most of the combinations.
Here is what I tried:

1. Adding a jar with the tester and tested classes to classpath. Nope
2. Adding the tester and tested classes to classpath. Nope
3. Adding a jar with tester and tested classes to /tomcat/lib. Nope
4. Adding the tester and tested classes to {javaroot}/jre/lib/ext. Nope
5. Adding a jar with tester and tested classes to {javaroot}/jre/lib/ext.Yep

I didn't try the sample application with Ant coz I don't have it installed.
Instead, I did it the "manual" way. However, I'm using the SampleServlet and
TestSampleServlet classes as is. Could there be any steps that the Ant build
step performed that I didn't? I'll check it out.

Summary of errors
There were 12 errors:
1) testReadServletOutputStream(TestSampleServlet)
java.lang.ExceptionInInitializerError: java.util.MissingResourceException:
Can't
 find bundle for base name cactus, locale en_US
        at java.util.ResourceBundle.throwMissingResourceException(Unknown
Source
)
        at java.util.ResourceBundle.getBundleImpl(Unknown Source)
        at java.util.ResourceBundle.getBundle(Unknown Source)
        at
org.apache.commons.cactus.client.ServletHttpClient.<clinit>(ServletHt
tpClient.java:78)
java.lang.NoClassDefFoundError
        at
org.apache.commons.cactus.ServletTestCase.runTest(ServletTestCase.jav
a:128)
        at
org.apache.commons.cactus.AbstractTestCase.runBare(AbstractTestCase.j
ava:266)

The error the SwingUI gives is "error instantiating class".

----- Original Message -----
From: "Vincent Massol" <[EMAIL PROTECTED]>
To: "Kelvin Tan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 6:58 PM
Subject: Re: [cactus] Help with Cactus


>
> ----- Original Message -----
> From: "Kelvin Tan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Vincent Massol"
> <[EMAIL PROTECTED]>
> Sent: Thursday, May 03, 2001 11:33 AM
> Subject: Re: [cactus] Help with Cactus
>
>
> > Vincent,
> >
> > Thanks once again for the quick response.
> >
> > No luck with the WAR option. Have placed the classes as instructed in
the
> > WAR Did not create any packages, so they are just in WEB-INF/classes.
> >
> > What I did, however, was JAR the tester and tested classes and placed
them
> > in {java root}/jre/lib/ext and it works! Somehow adding them manually to
> the
> > classpath doesn't work.
> >
> > Thanks!! Hope others can learn from my experience. :)
> >
>
> Maybe it works but this is not the coirrect way of doing it ... ! :)
> Here is what I propose :
> - try running the Sample application as is. What application server are
you
> using and in what version ?
> It should run perfectly well the first time and it does not use the
> jre/lib/ext. Then, learn from the Sample how to set it up. Look at the Ant
> build script to see the classpath to use. It really is a problem of
> classpath (I'm 99% confident ! :) that is the cause of failure, from
> previous end user experience).
>
> Thanks
> Vincent.
>
> > ----- Original Message -----
> > From: "Vincent Massol" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, May 03, 2001 5:36 PM
> > Subject: Re: [cactus] Help with Cactus
> >
> >
> > >
> > > ----- Original Message -----
> > > From: "Kelvin Tan" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>; "Vincent Massol"
> > > <[EMAIL PROTECTED]>
> > > Sent: Thursday, May 03, 2001 9:50 AM
> > > Subject: Re: [cactus] Help with Cactus
> > >
> > >
> > > > Vincent,
> > > >
> > > > Thanks for your prompt reply! Actually I had noticed that para that
> you
> > > > highlighted.
> > > >
> > > > "The Server part is usually packaged as a war file that you put in
> your
> > > > Servlet engine webapps directory.
> > > >
> > > > On the client side you simply need to put the above-mentionned
classes
> > in
> > > > your CLASSPATH (don't forget to put the cactus.properties file in
your
> > > > CLASSPATH). You start running the tests by starting a JUnit runner
> > (either
> > > > the gui one or the text one). "
> > > >
> > > > Unfortunately, the part is not clear (to me), the Server part
> > > > the classes you want to test,
> > > > your Cactus test classes,
> > > > the Cactus jar,
> > > > the JUnit jar,
> > > >
> > > > needs to be WARed. Is there a necessary directory structure, what
xml
> > > > deployment files need to be included in this WAR?
> > > >
> > > > Is it sufficient to just place the test classes in a directory
> mentioned
> > > in
> > > > the classpath or is it necessary to specify the classes
individually?
> > > >
> > > > Thanks!
> > > >
> > >
> > > Ok, Here is an example webapp :
> > >
> > > <mywebapp>/WEB-INF
> > >   |_ classes
> > >     |_ your classes under test (under the correct directory hierarchy)
> > >     |_ your test classes (under the correct directory hierarchy)
> > >   |_ lib
> > >     |_ commons-cactus.jar
> > >     |_ junit.jar
> > >
> > > Alternatively, if you use Cactus for testing several webapps, you
might
> > want
> > > to remove the jars from <mywebapp>/WEB-INF/lib and put them in the
> general
> > > classpath of your application server so that they will available to
any
> > > webapp.
> > >
> > > Note: Check the sample application that is delivered as part of
Cactus.
> It
> > > constructs a war file.
> > >
> > > Hope it helps.
> > > Vincent.
> > >
> >
> >
>

Reply via email to