Hi,

Well, it looks to me like he has thrown the NoSuchMethodException himself
in his ModelMBeanImpl.  This exception dexcends from Exception, thus is not
a reflection exception, and isn't caught by any of the exception
handlers/ignorers.

I don't yet understand what ModelMBeans are for... but if he changed the
missing method handling to match that of line 1620 of the MBeanServerImpl,
the problems might go away.


Further posts from Scott Stark and Marc Fleury make me think this may be
difficult to impossible.  If so, we could instead change ServiceControl to
ignore MethodNotFoundExceptions as well as ReflectionExceptions. e.g.
around line 67

         } catch (ReflectionException e)
         {
           // Not a service - ok 
         }
         catch (NoSuchMethodException e) {
           //Not a service - also ok
         } catch (RuntimeMBeanException e)


Personally I am inclined to suggest putting empty methods for the
nonexistent operations in every mbean.  I don't entirely understand why
this isn't in the mbean spec.

David Jencks

On 2001.04.10 21:12:52 -0400 [EMAIL PROTECTED] wrote:
> 
> Hey,
> 
> 
> > There shouldn't even be a log msg about the missing method since if you
> invoke a
> > method that does not exist on an MBean you will get a
> ReflectionException and
>> these are simply ignored. All MBeans show up on the management page
> because
> > this page is about MBeans and cares nothing about service abstractions.
> > 
> 
> Scott, that is what I thought too.  But how is he getting this
> stacktrace:
> 
> [Jetty]
> java.lang.NoSuchMethodException: init()
>  at com.mortbay.Jetty.JMX.ModelMBeanImpl.invoke(ModelMBeanImpl.java)
>  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
>  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>  at org.jboss.util.ServiceControl.init(ServiceControl.java:59)
>  at java.lang.reflect.Method.invoke(Native Method)
>  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
>  at
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>  at org.jboss.Main.<init>(Main.java:202)
>  at org.jboss.Main$1.run(Main.java:107)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at org.jboss.Main.main(Main.java:103)
> 
>  
> > 
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-development
> > 
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
> 


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to