Return-Path: list-help: list-unsubscribe: List-Post: List-Id: Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 76368 invoked by uid 99); 5 May 2006 15:41:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 May 2006 08:41:15 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of nitesh_varma@tvworks.com designates 209.82.43.45 as permitted sender) Received: from [209.82.43.45] (HELO tvpmail.ad.liberate.com) (209.82.43.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 May 2006 08:41:14 -0700 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: NoClassDefFoundError - please help Date: Fri, 5 May 2006 11:40:47 -0400 Message-ID: <03C8E1672F290B44B20D46DB98ED3622019A42FB@tvpmail.ad.liberate.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: NoClassDefFoundError - please help Thread-Index: AcZvwS24tdkJfNvPTgaJwreUtivQKAAkADiQ From: "Varma, Nitesh" To: X-Virus-Checked: Checked by ClamAV on apache.org I'm a newbie to Cactus and getting my feet wet. Has anybody had problem with their Cactus test unable to instantiate the = Servlet under test on the server side? I'll greatly appreciate any help = / hint.=20 I came across NoClassDefFoundError issues on cactus-users mail archive, = but my issue is different. My cactified EAR file contains the Servlet WAR file and cactus.war file = (which contains the Cactus test cases). The test's beginXXX() method = executes file, but when it enters the testXXX() method and tries to instantiate = the Servlet to test, I get the following exception: 14:13:19,951 INFO [STDOUT] java.lang.NoClassDefFoundError: = com/liberate/vod/web/TVPV7FrontServlet 14:13:19,952 INFO [STDOUT]at = com.liberate.vod.web.test.MyServletTest.testGetRootFolder(MyServletTest.j= ava:59) 14:13:19,952 INFO [STDOUT] at = sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14:13:19,952 INFO [STDOUT] at = sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java= :39) 14:13:19,952 INFO [STDOUT] at = sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:25) 14:13:19,952 INFO [STDOUT] at = java.lang.reflect.Method.invoke(Method.java:585) ... I used the following to cactify my ear file: This generates cactus.war with the following structure: WEB-INF\classes\com\liberate\vod\web\test\MyServletTest.class WEB-INF\lib + |-aspectrjt-1.2.1.jar |-cactus-1.7.1.jar |-commons-logging-1.0.4.jar |-junit-3.8.1.jar WEB-INF\web.xml Clearly, my ServletTestCase is not able to reference the Servlet under = test, even though they are under the same EAR file (different WAR file = though - Servlet is in application WAR and test is in cactus war). So I don't = know if there are classloader issues involved, and if so, then how to = get rig=3Dd of them. Thanks, Nitesh