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 97802 invoked from network); 13 Nov 2003 21:06:45 -0000 Received: from unknown (HELO smtp10.atl.mindspring.net) (207.69.200.246) by daedalus.apache.org with SMTP; 13 Nov 2003 21:06:45 -0000 Received: from [192.168.167.41] (helo=wamui03.slb.atl.earthlink.net) by smtp10.atl.mindspring.net with esmtp (Exim 3.33 #1) id 1AKOfy-0003Kv-00 for cactus-user@jakarta.apache.org; Thu, 13 Nov 2003 16:06:50 -0500 Message-ID: <24554312.1068757611114.JavaMail.root@wamui03.slb.atl.earthlink.net> Date: Thu, 13 Nov 2003 15:06:50 -0600 (GMT-06:00) From: Andrew Boyd Reply-To: Andrew Boyd To: cactus-user@jakarta.apache.org Subject: IllegalAccessError calling package private methods Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Earthlink Zoo Mail 1.0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi All, I'm getting the following error when running my cactus tests: java.lang.IllegalAccessError: tried to access method com.digitalreasoning.kafe.host.Host.getKafeMBeanServer() from class com.digitalreasoning.kafe.host.HostObjectFactoryTest at com.digitalreasoning.kafe.host.HostObjectFactoryTest.testDomainName(HostObjectFactoryTest.java:44) The method getKafeMBeanServer() is a package private method in Host. /** * Returns the MBeanServer created by this Host. * Keeping this package private for testing since the Host should provide * any fuctionality that my be derived from the MBeanServer * @return */ MBeanServer getKafeMBeanServer(){ return kafeMbeanServer_; } HostObjectFactoryTest is in the same package as you can tell. The method testDomainName() is: /** * Make sure that the MBeanServer is created with the expected * DomainName. */ public void testDomainName(){ Host host = HostObjectFactory.createHost(); MBeanServer server = host.getKafeMBeanServer(); assertTrue("Asserting True that "+Host.DOMAIN + " == "+ server.getDefaultDomain(), server.getDefaultDomain().equals(Host.DOMAIN)); } Any ideas why I'm getting the IllegalAccessError? Thanks Andrew Boyd Software Architect Sun Certified J2EE Architect B&B Technical Services Inc. 205.422.2557