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 6544 invoked by uid 99); 3 Sep 2004 14:50:29 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [203.124.159.26] (HELO indicussoftware.com) (203.124.159.26) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 03 Sep 2004 07:50:27 -0700 Received: from [192.168.100.67] by indicussoftware.com (MDaemon.PRO.v7.2.0.R) with ESMTP id md50000016165.msg for ; Fri, 03 Sep 2004 20:25:00 +0530 Date: Fri, 03 Sep 2004 20:21:25 +0530 From: Amol To: cactus-user@jakarta.apache.org Subject: Cactus and weblogic7 using JBuilder9 Message-Id: <20040903200843.A8E4.AMOL@indicussoftware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.08.01 [en] X-Spam-Processed: altair100, Fri, 03 Sep 2004 20:25:00 +0530 (not processed: spam filter disabled) X-MDRemoteIP: 192.168.100.67 X-Return-Path: amol@indicussoftware.com X-MDaemon-Deliver-To: cactus-user@jakarta.apache.org Reply-To: amol@indicussoftware.com X-MDAV-Processed: altair100, Fri, 03 Sep 2004 20:25:04 +0530 X-Virus-Checked: Checked Hello, I am new to Cactus I just started using Cactus for EJB Unit Testing. I used it with JBoss3.2.2 but I am facing some problem with weblogic-7. I want to know stepwise procedure to use cactus with weblogic and run the tests. Please help me. My web.xml is as follows ServletRedirector org.apache.cactus.server.ServletTestRedirector ServletRedirector /ServletRedirector CurrencyConverter Session example.CurrencyConverterHome example.CurrencyConverter CurrencyConverter and weblogic.xml is as CurrencyConverter CurrencyConverter CurrencyConverter CurrencyConverter I have deployed CurrencyConverter bean on weblogic succefully now I want to test that bean so I have written a Test class as follows package amol; import example.*; import javax.rmi.*; import java.util.Properties; import javax.naming.Context; import javax.naming.InitialContext; import junit.framework.*; import org.apache.cactus.*; public class CurrencyConverterTest extends ServletTestCase { private CurrencyConverter converter; public CurrencyConverterTest(String name) { super(name); } public static Test suite() { return new TestSuite(CurrencyConverterTest.class); } public void setUp() { try { Properties prop = new Properties(); prop.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); prop.put(Context.PROVIDER_URL, "t3://localhost:7001"); Context ctx = new InitialContext(prop); Object objref = ctx.lookup("CurrencyConverter"); CurrencyConverterHome home = (CurrencyConverterHome) javax.rmi.PortableRemoteObject.narrow( objref, CurrencyConverterHome.class); converter = home.create(); } catch(Exception e) { e.printStackTrace(); } } public void testConvertCurrencyRsToDollar() throws Exception { double dollar = this.converter.ConvertCurrencyRsToDollar(2000); assertEquals("rs", 40, dollar, 0); } public void testConvertCurrencyDollarToRs() throws Exception { double dollar = this.converter.ConvertCurrencyDollarToRs(2000); assertEquals("dollar", 100000, dollar, 0); } } I created a war file of above compiled CurrencyConverterTest.class file,web.xml and weblogic.xml and deploying it as separate webapplication on weblogic whether I am following CORRECT procedure or it is wrong? if wrog please tell me stepwise procedure for EJB Unit testing on weblogic Ii am getting error like weblogic.management.ApplicationException: activate failed forEJB-Test { Module Name: EJB-Test, Error: weblogic.j2ee.DeploymentException: Could not setup environment - with nested exception: [weblogic.deployment.EnvironmentException: Could not resolve ejbLink: CurrencyConverter] } at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1035) at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1016) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1112) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:732) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134) Thanks & Regards, Amol Pophale Software Programmer Indicus Software Pvt. Ltd. 28, Varshananda Society, Sinhagad Road, Pune - 411051 Tel : +91-20-24341287 / 8 Mobile No. : +91-9822207490 Email: amol@indicussoftware.com Web: http://www.indicussoftware.com