Colin Kilburn - 2002-11-03

I'm trying to get my first Struts Test Case going and can't seem to get out of the starting blocks.  I'm able to run regular cactus servlet tests just fine.  I have a simple test that merely invokes the default struts ForwardAction class.  Here's the action in my struts-config.xml:

        <action
           path="/simpleAction"
           unknown="false"
           validate="false"
           type="org.apache.struts.actions.ForwardAction">
           <forward
               name="success"
               path="/foo.html"
               contextRelative="true"
               redirect="false" />
       </action>

and the relevant test:

package com.mydomain.action;
import org.apache.cactus.WebRequest;
import com.mydomain.Constants;
import servletunit.struts.CactusStrutsTestCase;

public class ForwardActionTest extends CactusStrutsTestCase {

   public ForwardActionTest(String arg0) {
      super(arg0);
   }

   public void testSuccessfulForward() {
      setRequestPathInfo("/simpleAction");

      //       actionPerform();
      //       verifyForward(Constants.SUCCESS_KEY);
      assertTrue(true);
   }
}

When I run the test, I get the following exception:

javax.servlet.ServletException: Error instantiating class com.mydomain.action.ForwardActionTest(testSuccessfulForward)]
at org.apache.cactus.server.AbstractWebTestCaller.getTestClassInstance(AbstractWebTestCaller.java:312)
at org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:143)
at org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):125)
a
<massive snip>

Has anyone else had this error?  The stack trace doesn't seem to offer any useful info, and I can't seem to find anything on google or the cactus archives.

TIA,
Colin Kilburn