From cactus-user-return-8153-apmail-jakarta-cactus-user-archive=jakarta.apache.org@jakarta.apache.org Thu Dec 11 17:57:32 2008 Return-Path: Delivered-To: apmail-jakarta-cactus-user-archive@www.apache.org Received: (qmail 11334 invoked from network); 11 Dec 2008 16:57:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2008 16:57:31 -0000 Received: (qmail 28327 invoked by uid 500); 11 Dec 2008 16:57:43 -0000 Delivered-To: apmail-jakarta-cactus-user-archive@jakarta.apache.org Received: (qmail 28305 invoked by uid 500); 11 Dec 2008 16:57:43 -0000 Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Cactus Users List" Reply-To: "Cactus Users List" Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 28294 invoked by uid 99); 11 Dec 2008 16:57:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2008 08:57:43 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.84.21.205] (HELO sfmail.Bricsnet.local) (64.84.21.205) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2008 16:57:22 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: java.lang.NoSuchFieldError: config Date: Thu, 11 Dec 2008 08:56:57 -0800 Message-ID: <75D3A3FAC7B2B94B9FDF79E472BE9E240626CDA2@sfmail.Bricsnet.local> In-Reply-To: <94b3482b0812110423n2660aa3cl2c7fce68f0516963@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: java.lang.NoSuchFieldError: config Thread-Index: Aclbi1gWdYDe/RnJSYmHLx8rBtqLQwAJb0iw References: <94b3482b0812110423n2660aa3cl2c7fce68f0516963@mail.gmail.com> From: "Daniel Lipofsky" To: "Cactus Users List" X-Virus-Checked: Checked by ClamAV on apache.org I don't remember what error I had, but I know I had to patch StrutsTest 2.1.4 to work with Cactus 1.8.0. Try this patch (at bottom of page) and see if it helps: http://danlipofsky.com/technical/cactus/ - Dan > -----Original Message----- > From: sach Beeharry [mailto:sachtruth@googlemail.com] > Sent: Thursday, December 11, 2008 5:23 AM > To: cactus-user@jakarta.apache.org > Subject: java.lang.NoSuchFieldError: config >=20 > Hi, >=20 > I am trying to test my action class using cactus. My web application is > on > Tomcat and I am running the test from Eclipse. > But I am getting the following error when the test runs: >=20 > java.lang.NoSuchFieldError: config > at > servletunit.struts.CactusStrutsTestCase.setUp(CactusStrutsTestCase.java > :101) > at junit.framework.TestCase.runBare(TestCase.java:128) > at > org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(Abstrac > tCactusTestCase.java:155) > at > org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(Abstract > WebTestCaller.java:120) > at > org.apache.cactus.internal.server.AbstractWebTestController.handleReque > st_aroundBody0(AbstractWebTestController.java:94) > at > org.apache.cactus.internal.server.AbstractWebTestController.handleReque > st_aroundBody1$advice(AbstractWebTestController.java:218) > at > org.apache.cactus.internal.server.AbstractWebTestController.handleReque > st(AbstractWebTestController.java:1) >=20 > I think this error is caused because the *config* field cannot be found > in > the setUp() method of the CactusStrutsTestCase class. May be some > compatibility issue. >=20 > protected void setUp() > throws Exception > { > if(logger.isDebugEnabled()) > { > logger.debug("Entering"); > } > try > { > if(actionServlet =3D=3D null) > { > actionServlet =3D new ActionServlet(); > } > ServletContext servletContext =3D new > StrutsServletContextWrapper* > (config*.getServletContext()); >=20 > also: >=20 > *CactusStrutsTestCase extends ServletTestCase* and ServletTestCase > contains > the attribute *public AbstractServletConfigWrapper config > * > From the above the config field should normally be accessible, but it > is > not the case. >=20 > Can anyone help me solving this? >=20 > Thanks in advance. >=20 > Sach --------------------------------------------------------------------- To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: cactus-user-help@jakarta.apache.org