Any chance of getting support for the latest version of Cactus?
Here's what happens at the moment:
java.lang.NoSuchFieldError: servletunit/struts/CactusStrutsTestCase.config
at servletunit.struts.CactusStrutsTestCase.setUp(CactusStrutsTestCase.java:105)
at au.com.suttons.general.struts.ActionTestCase.setUp(ActionTestCase.java:233)
at au.com.suttons.general.businessentity.struts.BaseActionTestCase.setUp(BaseActionTestCase.java:37)
at au.com.suttons.general.businessentity.struts.TestStatementAction.setUp(TestStatementAction.java:151)
at junit.framework.TestCase.runBare(TestCase.java:128)
at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:155)
at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:120)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:94)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:225)
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java:1)
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:102)
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:225)
at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java:1)
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:73)
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:225)
at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java:1)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
I wrote a patch to fix this which is available at
http://danlipofsky.com/technical/cactus/
it is very simple, it looks like
<pre>
--- src/servletunit/struts/StrutsRequestWrapper.java.ORIG 2004-06-08 13:43:04.000000000 -0600
+++ src/servletunit/struts/StrutsRequestWrapper.java 2008-07-02 14:08:05.000000000 -0600
@@ -18,7 +18,7 @@
import org.apache.cactus.ServletURL;
import org.apache.cactus.server.HttpServletRequestWrapper;
-
+import javax.servlet.http.HttpServletRequest;
import java.util.*;
/**
@@ -34,7 +34,7 @@
private String servletPath;
private Map parameters;
- public StrutsRequestWrapper(HttpServletRequestWrapper request) {
+ public StrutsRequestWrapper(HttpServletRequest request) {
super(request,new ServletURL(request.getServerName(),request.getContextPath(),request.getServletPath(),request.getPathInfo(),request.getQueryString()));
parameters = new HashMap();
}
</pre>