File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Testing and the fly likes Run junit CactusStrutsTestCase with Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Run junit CactusStrutsTestCase with Tomcat" Watch "Run junit CactusStrutsTestCase with Tomcat" New topic

Run junit CactusStrutsTestCase with Tomcat

Kaizar Laxmidhar

Joined: Feb 25, 2004
Posts: 10
Hi Friends,
While running CactusStrutsTestCase, I get below exception, can anyone suggest what can be wrong? I feel that it may be because of jar file version mismatch but still not able to figurout exact. Below is the exception.

testSuccessfulSearch(calendar.TestCalendarSearch)java.lang.NoSuchFieldError: config
[java] at servletunit.struts.CactusStrutsTestCase.setUp(
[java] at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(
[java] at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(
[java] at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(
[java] at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(
[java] at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(
[java] at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(
[java] at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(
[java] at org.apache.cactus.server.ServletTestRedirector.doPost(
[java] at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(
[java] at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(
[java] at org.apache.cactus.server.ServletTestRedirector.doGet(
[java] at javax.servlet.http.HttpServlet.service(
[java] at javax.servlet.http.HttpServlet.service(
[java] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
[java] at org.apache.catalina.core.ApplicationFilterChain.doFilter(
[java] at org.apache.catalina.core.StandardWrapperValve.invoke(
[java] at org.apache.catalina.core.StandardContextValve.invoke(
[java] at org.apache.catalina.core.StandardHostValve.invoke(
[java] at org.apache.catalina.valves.ErrorReportValve.invoke(
[java] at org.apache.catalina.core.StandardEngineValve.invoke(
[java] at org.apache.catalina.connector.CoyoteAdapter.service(
[java] at org.apache.coyote.http11.Http11Processor.process(
[java] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
[java] at$
[java] at

Rodrigo Lopes
Ranch Hand

Joined: Feb 29, 2008
Posts: 119
Take a look at How To Ask Questions On Java Ranch
Specially at this item
Kaizar Laxmidhar

Joined: Feb 25, 2004
Posts: 10
Here is the code which throws the exception. I am running below test in command prompt like "% java calendar.TestCalendarSearch"

package calendar;

import servletunit.struts.CactusStrutsTestCase;
import com.datalex.bic.beans.CalendarSearchParam;
import com.datalex.has.travelservices.handlers.HasDate;

public class TestCalendarSearch extends CactusStrutsTestCase{
public TestCalendarSearch(String testName){
public static void main(String[] args){;
public void testSuccessfulSearch(){

kais houdhini

Joined: Jun 13, 2008
Posts: 1
!!! I have exactly the same problem with cactusstrutstestcase and i d'ont found the solution.
Please help
I agree. Here's the link:
subject: Run junit CactusStrutsTestCase with Tomcat
It's not a secret anymore!