Have fixed the problem.
Lessons learnt:
1. Although placing the Tester and Tested classes in {javahome}/jre/lib/ext
works, it's certainly NOT the way to do it.
2. Clean out the classpath. I'm running on Win98 system and it doesn't
handle my overloaded classpath very well, together with Tomcat's overloaded
/lib folder.
3. Tomcat 3.2.1 does not work with Servlet API 2.3
Errors (and what they mean)
Error: java.lang.ExceptionInInitializerError:
java.util.MissingResourceException:
Can't find bundle for base name cactus, locale en_US at
java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
Meaning: The folder cactus.properties is in is NOT in your classpath
Error: java.io.FileNotFoundException:
http://localhost:8080/servlettest/ServletRedirector at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at
org.apache.commons.cactus.client.ServletHttpClient.doTest(ServletHttp
Meaning: Servlet Redirector not set up properly. Consult /webapps/web.xml
Error: ClassNotFoundException org/apache/commons/cactus/ ... not found
Meaning: commons-cactus.jar not in your classpath
Error: javax.servlet.ServletException: Error instanciating
class[TestSampleServlet]
Meaning: You've got EVERYTHING ELSE right and likely to be last error in
your way. Probably something wrong with the server-side classpath. Ensure
that the jar file is in your classpath, and that the WAR file is deployed
correctly in Servlet Container. For WinXX systems, I recommend that any
changes to classpath made to c:\autoexec.bat should be followed with a
restart for changes to fully take effect.
Anyone facing any more problems with getting Cactus to work (in particular
with WinXX systems), please don't hesistate to contact me. :)
----- Original Message -----
From: "Vincent Massol" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 4:22 PM
Subject: Re: [cactus] Help with Cactus
>
> ----- Original Message -----
> From: "Kelvin Tan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, May 04, 2001 8:51 AM
> Subject: Re: [cactus] Help with Cactus
>
>
> > 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
> >
>
> Kelvin, here is the list of files you need to have in your client
classpath
> (extracted from the http://jakarta.apache.org/commons/cactus/servlets.html
> page) :
>
> -your Cactus test classes,
> -the Cactus jar,
> -the Servlet API jar. This is needed because the ServletTestCase and
> JspTestCase classes use server objects.
> -the cactus.properties Cactus configuration file,
> -the JUnit jar,
>
> I have also modified the cactus web site (right now) and put more
> explanation on the installation page (which was missing the fact that the
> cactus.properties file need to be in the CLASSPATH).
>
> > 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
>
> This means that the cactus.properties file is *not* in the CLASSPATH.
Check
> http://jakarta.apache.org/commons/cactus/configuration.html
>
> [snip]
>
>