File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Testing and the fly likes Cactus: java.lang.NoSuchErrorField: Config Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Cactus: java.lang.NoSuchErrorField: Config" Watch "Cactus: java.lang.NoSuchErrorField: Config" New topic

Cactus: java.lang.NoSuchErrorField: Config

Clinton Morrison

Joined: Jun 28, 2007
Posts: 24
When I run the class below through Eclipse JUnit plugin, I receive the error java.lang.NoSuchErrorField:config. I can't see what I am doing wrong? Thanks in advance.

Cactus Class
package testing.cactus;

import servletunit.struts.CactusStrutsTestCase;

* The Class LoginCactusTest.
public class LoginCactusTest extends CactusStrutsTestCase {

/** The Constant ACTION_PATH. */
private static final String ACTION_PATH = "/ProcessLogin";

* Instantiates a new login cactus test.
* @param testName the test name
public LoginCactusTest(String testName) {


public void setUp() throws Exception {

* Test valid user login.
* @throws Exception the exception
public void testValidUserLogin() throws Exception {

java.lang.NoSuchFieldError: config
at servletunit.struts.CactusStrutsTestCase.setUp(
at testing.cactus.LoginCactusTest.setUp(
at junit.framework.TestCase.runBare(
at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(
at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(
at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(
at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(
at org.apache.cactus.server.ServletTestRedirector.doPost(
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(
at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(
at org.apache.cactus.server.ServletTestRedirector.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at weblogic.servlet.internal.ServletStubImpl$
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
at weblogic.servlet.internal.WebAppServletContext$
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(
at weblogic.servlet.internal.ServletRequestImpl.execute(
at weblogic.kernel.ExecuteThread.execute(
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

Is the web project in the classpath for the project containing this test? I'm wondering if the test can't find the web project and therefore the config file.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Clinton Morrison

Joined: Jun 28, 2007
Posts: 24
I am running the class through the Eclipse IDE, JUnit plug in. When I check the class path I can see project?
I agree. Here's the link:
subject: Cactus: java.lang.NoSuchErrorField: Config
jQuery in Action, 3rd edition