[jboss-jira] [JBoss JIRA] Commented: (JBAS-5933) JMX operations eat underlying exception

Dimitris Andreadis (JIRA) jira-events at lists.jboss.org
Mon Sep 8 17:07:38 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBAS-5933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12428659#action_12428659 ] 

Dimitris Andreadis commented on JBAS-5933:
------------------------------------------

I can see the change in the RawDynamicInvoker, which BTW needs to be done differently as NotCompliantMBeanException does not have a CTOR that takes a cause:

      catch (Exception e)
      {
         // turn into a NotCompliantMBeanException
         Exception ncmbe = new NotCompliantMBeanException("Cannot obtain MBeanInfo for: " + oname);
         ncmbe.initCause(e);
         throw ncmbe;
      }

Regarding MBeanServerImpl, where exactly you think we are eating exceptions?

> JMX operations eat underlying exception
> ---------------------------------------
>
>                 Key: JBAS-5933
>                 URL: https://jira.jboss.org/jira/browse/JBAS-5933
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JMX
>    Affects Versions: JBossAS-4.2.3.GA
>            Reporter: Jay Howell
>            Assignee: Dimitris Andreadis
>
> Inside of both MBeanSeverImpl and the RawDynamicInvoker, exceptions are being eaten, when the getMBeanInfo method is being called. The only thing thrown is the NotCompliantMBeanException with a canned exception message. The underlying exception can be anything from a classloader issue, to just a plain old CNF Exception. This code needs to be changed so that the underlying exception is propagated out to be seen in the log.
> the code is...
> try
>      {
>         this.info = getMBeanInfo();
>      }
>      catch (Exception e)
>      {
>         throw new NotCompliantMBeanException("Cannot obtain MBeanInfo, for: " + oname);
>      }
> which just eats the underlying Exception.
> This should be
> try
>      {
>         this.info = getMBeanInfo();
>      }
>      catch (Exception e)
>      {
>         throw new NotCompliantMBeanException("Cannot obtain MBeanInfo, for: " + oname, e);
>      }
> And NotCompliantMBeanException should be chaned to take the nested exception. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list