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 80362 invoked from network); 30 Jun 2003 16:30:35 -0000 Received: from unknown (HELO io.heavens-door.net) (62.96.5.66) by daedalus.apache.org with SMTP; 30 Jun 2003 16:30:35 -0000 Received: from gmx.de (fire1.mediatis.de [62.96.5.65]) by io.heavens-door.net (Postfix) with ESMTP id E27AA1FFBD for ; Mon, 30 Jun 2003 18:30:29 +0200 (CEST) Message-ID: <3F006626.2020706@gmx.de> Date: Mon, 30 Jun 2003 18:32:38 +0200 From: Christopher Lenz Organization: mediatis GmbH User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: de-de, en MIME-Version: 1.0 To: Cactus Users List Subject: Re: Setting up Cactus Tests with NetBeans IDE 3.5, Tomcat 4.1.24, and CactusStrutsTest 1.9.6 References: <00ee01c33f15$80519840$dcbf2b8f@alejandro> <3F0053E8.6070700@gmx.de> <012101c33f22$e14e0310$dcbf2b8f@alejandro> In-Reply-To: <012101c33f22$e14e0310$dcbf2b8f@alejandro> X-Enigmail-Version: 0.73.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Alejandro, Alejandro wrote: > Actually, take that back. I was using MockStrutsTestCase (which doesn't use > Cactus), by mistake. I changed the extends class and the import lines in > both the Client and Container, to use CactusStrutsTestCase. :-) > Here's my new configuration: > Client Side: > c:\subversion\argyle\trunk\qa\test\org\cait\argyle\module\bulletinBoard\stru > ts\action\TestAddTopicAction.class > c:\subversion\argyle\trunk\qa\test\org\cait\argyle\module\bulletinBoard\stru > ts\action\cactus.properties > c:\subversion\argyle\trunk\qa\test\org\cait\argyle\module\bulletinBoard\stru > ts\action\log4j.properties Errm. What java package is that then? Both property files need to be in the *default* package. I *guess* that would translate to the location c:\subversion\argyle\trunk\qa\test\ in your case. > Container Side: > c:\TOMCAT\webapps\bulletinBoard\WEB-INF\classes\TestAddTopicAction.class This actually depends on the package your test class is in... if it's in the default package, okay. > c:\TOMCAT\webapps\bulletinBoard\WEB-INF\classes\cactus.properties > c:\TOMCAT\webapps\bulletinBoard\WEB-INF\classes\log4j.properties You don't actually need cactus.properties here. It's only required on the client side. [http://jakarta.apache.org/cactus/integration/howto_config.html] > c:\TOMCAT\webapps\bulletinBoard\WEB-INF\lib\argyle.jar (with my classes > under test here) > > When I run the Client Side class, I get the error below > Questions: > 1) My cactus.properties file includes only the required cactus.setContextURL > parameter, do I need to add the other ones? Well, *cactus.contextURL* would definitely help. ;-) Note there's no "set" in the property name. > 2) Where do I need to put the CACTUS jar files? I currently have them in > TOMCAT\common\lib > 3) Is this correct?: The IMPORT line in both my Client Side and Container > Side java classes is the same: > import qa.test.org.cait.argyle.module.bulletinBoard.struts.action; > > > Apparently everything's in place. Apparently not, or it'd be working ;-) > ----ERROR------------------------------------------------------------------- > ----------------------- > .log4j:WARN No appenders could be found for logger > (org.apache.cactus.util.JUnitVersionHelper). > log4j:WARN Please initialize the log4j system properly. (See, the log4j.properties isn't picked up either) > E > Time: 0.07 > There was 1 error: > 1) > testSuccessfulAddTopic(qa.test.org.cait.argyle.module.bulletinBoard.struts.a > ction.TestAddTopicAction)org.apache.cactus.util.ChainedRuntimeException: > Missing Cactus property [cactus.contextURL] > at > org.apache.cactus.util.Configuration.getContextURL(Configuration.java:185) > at > org.apache.cactus.util.ServletConfiguration.getServletRedirectorURL(ServletC > onfiguration.java:94) > at > org.apache.cactus.client.ServletHttpClient.getRedirectorURL(ServletHttpClien > t.java:87) > at > org.apache.cactus.client.AbstractHttpClient.callRunTest(AbstractHttpClient.j > ava;org/apache/cactus/util/log/LogAspect.aj(1k):184) > at > org.apache.cactus.client.AbstractHttpClient.dispatch2_doTest(AbstractHttpCli > ent.java;org/apache/cactus/util/log/LogAspect.aj(1k):109) > at > org.apache.cactus.client.AbstractHttpClient.around2_doTest(AbstractHttpClien > t.java;org/apache/cactus/util/log/LogAspect.aj(1k):1218) > at > org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.java;o > rg/apache/cactus/util/log/LogAspect.aj(1k):104) > at > org.apache.cactus.AbstractWebTestCase.runGenericTest(AbstractWebTestCase.jav > a:260) > at > org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133) > at > org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:195) > at > qa.test.org.cait.argyle.module.bulletinBoard.struts.action.TestAddTopicActio > n.main(TestAddTopicAction.java:96) > FAILURES!!! > Tests run: 1, Failures: 0, Errors: 1 >  > ----ERROR------------------------------------------------------------------- > ----------------------- -chris