From geronimo-dev-return-6304-apmail-incubator-geronimo-dev-archive=incubator.apache.org@incubator.apache.org Wed Feb 04 23:22:37 2004 Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@www.apache.org Received: (qmail 92084 invoked from network); 4 Feb 2004 23:22:37 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 4 Feb 2004 23:22:37 -0000 Received: (qmail 35505 invoked by uid 500); 4 Feb 2004 23:20:52 -0000 Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 35428 invoked by uid 500); 4 Feb 2004 23:20:52 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 35295 invoked from network); 4 Feb 2004 23:20:51 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by daedalus.apache.org with SMTP; 4 Feb 2004 23:20:51 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AoWKE-0000LJ-00 for ; Thu, 05 Feb 2004 00:20:57 +0100 Received: from cpe-203-45-72-167.nsw.bigpond.net.au ([203.45.72.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed Feb 4 23:20:57 2004 Received: from gregw by cpe-203-45-72-167.nsw.bigpond.net.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed Feb 4 23:20:57 2004 X-Injected-Via-Gmane: http://gmane.org/ To: geronimo-dev@incubator.apache.org From: Greg Wilkins Subject: Re: GBean configuration confusion Date: Thu, 05 Feb 2004 10:20:48 +1100 Lines: 114 Message-ID: References: <40206B92.6020100@mortbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: cpe-203-45-72-167.nsw.bigpond.net.au User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3 X-Accept-Language: en In-Reply-To: Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Dain Sundstrom wrote: >> If you try calling any methods on it, including toString, it gives you a >> java.lang.IllegalStateException: Proxy is stopped >> I'm not sure what state this is meant to be in??? > > Proxies are not valid until doStart. This is due to the fact that the > pattern you have assigned for the endpoint may not match any other > running GBeans (or their may be more then one matching GBean). When > you enter the running state we lock down the single reference. OK - so I should leave that config alone in the context constructor (I was only wondering what it was :-) But as you say, the NPE that results if I don't catch the IllegalStateException does appear wacky. To get this NPE, simply throw an IllegalStateException from the constructor of JettyWebApplicationContext and this will cause the NPE. There are obviously other ways it can be triggerred, as I'm currently trying to add an attribute to the context GBean - I must have done something wrong somewhere, that is resulting in an exception somewhere - as I'm getting this NPE. But for the life of me I can't find out what the original exception is yet. Still learning eclipse - so debugging multiple threads over multiple projects with generated code is a tad beyond me at the moment. So far my exhaustive hunt-and-kill-bug-with-printlns approach has also failed to work out where the problem is. So any help working out the causes of the NPE and how to better catch and report them would be good. Perhaps just an empty catch block somewhere? cheers >> More annoyingly, if you do not catch this exception then the kernel >> start >> mechanism does not handle it well - it continues on an NPEs later: >> >> java.lang.NullPointerException >> at >> org.apache.geronimo.gbean.jmx.GBeanMBeanReference.handleNotification(GB >> eanMBeanReference.java:321) >> at >> mx4j.server.interceptor.NotificationListenerMBeanServerInterceptor$List >> enerWrapper.handleNotification(NotificationListenerMBeanServerIntercept >> or.java:57) >> at >> javax.management.NotificationBroadcasterSupport.handleNotification(Noti >> ficationBroadcasterSupport.java:343) >> at >> javax.management.NotificationBroadcasterSupport.sendNotification(Notifi >> cationBroadcasterSupport.java:317) >> at >> org.apache.geronimo.gbean.jmx.AbstractManagedObject.sendNotification(Ab >> stractManagedObject.java:282) >> at >> org.apache.geronimo.gbean.jmx.AbstractManagedObject.attemptFullStart(Ab >> stractManagedObject.java:535) >> at >> org.apache.geronimo.gbean.jmx.AbstractManagedObject.start(AbstractManag >> edObject.java:317) >> at >> org.apache.geronimo.gbean.jmx.AbstractManagedObject.startRecursive(Abst >> ractManagedObject.java:341) >> at >> org.apache.geronimo.gbean.jmx.GBeanMBean$8.invoke(GBeanMBean.java:617) >> at >> org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOper >> ation.java:193) >> at >> org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:488) >> at >> mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBe >> anServerInterceptor.java:224) >> at >> mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBe >> anServerInterceptor.java:121) >> at >> mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityM >> BeanServerInterceptor.java:86) >> at >> mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBe >> anServerInterceptor.java:121) >> at >> mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBe >> anServerInterceptor.java:121) >> at >> mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke >> (ContextClassLoaderMBeanServerInterceptor.java:205) >> at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1077) >> at >> org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartComma >> nd.java:88) >> at java.lang.Thread.run(Thread.java:536) > > > I don't see how this is possible. Do you still have the code that > makes this happen? If so, please send it to me. > >> So I think something in AbstractManagedObject.java needs a better >> catch block. >> I'm not familiar enough with this code yet to guess where this should >> be... > > > Their is definitely something wacky going on. > > -dain > >