4 Replies Latest reply: Sep 29, 2014 2:37 AM by Klara Ward, Java Mission Control Dev-Oracle RSS

    JMC (1.7_60) always gets UndeclaredThrowableException connecting to remote MBean Server after setting up a custom chart on dashboard

    fwelland

      After creating a remote JVM connections to a JMX enabled remote JVM and connecting and all is well.    I then create a new chart on the Overview Tab of the MBean Server, when doing so I select a numeric attribute from the inventory of JMX attributes and continue the chart set up.


      The chart works great (aside from I can't figure out how or if you can change the legend labels)!!!!

       

      If I just down JMC and then restart it again (or close the MBean Browser), JMC will remember my connection fine.   When I click on 'MB Server' under the JVM node in the JVM browser, JMC starts it connection stuff and the fails with

       

      java.lang.reflect.UndeclaredThrowableException

        at com.sun.proxy.$Proxy105.getMBeanInfo(Unknown Source)

        at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1481)

      .....

      Caused by: javax.management.InstanceNotFoundException: amx:name=resources

        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)

        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375)

        at com.sun.jmx.mbeanserver.JmxMBeanServer.getMBeanInfo(JmxMBeanServer.java:920)

        at com.sun.enterprise.v3.admin.DynamicInterceptor.getMBeanInfo(DynamicInterceptor.java:534)

        ... 24 more

       

      This happens 100% of the time.    This also happens if I add Trigger on a JMX attribute.   

       

      If I create a connection, and do NO customization to the displays or alerts; I can open and close the mbean server for that connection over and over, no problems.

       

       

      Is there any work around for this?  

        • 1. Re: JMC (1.7_60) always gets UndeclaredThrowableException connecting to remote MBean Server after setting up a custom chart on dashboard
          Mattias Jo�lson-Oracle

          This sounds quite interesting. Would you be able to provide the version number of JMC you are using and untruncated stack traces so I could look into this some more?

          • 2. Re: JMC (1.7_60) always gets UndeclaredThrowableException connecting to remote MBean Server after setting up a custom chart on dashboard
            fwelland

            So I updated to JDK 1.7_65 recently.   I have and still am using the JMC that came with my JDK.   

             

            Here are the pertinent details:


            Oracle® Java Mission Control 5.3.0 (M5.3.0-105, 159881)

            java version "1.7.0_65"

            Java(TM) SE Runtime Environment (build 1.7.0_65-b17)

            Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

             

            Fedora 20:   3.15.4-200.fc20.x86_64 #1 SMP Mon Jul 7 14:24:41 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

             

            This version of JMC does the same exact thing.      FWIW, I am/was monitoring JDBC Connection Pool usage from a glassfish  3.1.2.2 server.    The previous version of JMC was the one that came with JDK 1.7_60 ( Oracle® Java Mission Control 5.3.0 (M5.3.0-105, 159881) ); just rested it -- still crashes in this case.

             

            For giggles I tried the JMC that came with JDK 1.8_11 -- it seems like the same version that comes with  _60 and _65 (Oracle® Java Mission Control 5.3.0 (M5.3.0-105, 159881)):   same crash.  

             

             

            In all 3 cases I would use a terminal window    cd  /opt/<jdk_version_home>/bin and then run "./jmc"  

             

            Here is a longer stack trace  (the previous one was just the bottom part of it):  

             

             

            java.lang.reflect.UndeclaredThrowableException

              at com.sun.proxy.$Proxy544.getMBeanInfo(Unknown Source)

              at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1481)

              at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)

              at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)

              at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420)

              at javax.management.remote.rmi.RMIConnectionImpl.getMBeanInfo(RMIConnectionImpl.java:924)

              at sun.reflect.GeneratedMethodAccessor3822.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

              at sun.rmi.transport.Transport$1.run(Transport.java:177)

              at sun.rmi.transport.Transport$1.run(Transport.java:174)

              at java.security.AccessController.doPrivileged(Native Method)

              at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at java.lang.Thread.run(Thread.java:745)

              at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)

              at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)

              at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)

              at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)

              at javax.management.remote.rmi.RMIConnectionImpl_Stub.getMBeanInfo(Unknown Source)

              at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getMBeanInfo(RMIConnector.java:1081)

              at com.jrockit.mc.rjmx.internal.MCMBeanServerConnection.getMBeanInfo(MCMBeanServerConnection.java:476)

              at com.jrockit.mc.rjmx.internal.RJMXConnection.getMBeanInfo(RJMXConnection.java:402)

              at com.jrockit.mc.rjmx.internal.DefaultConnectionHandle.getMBeanInfo(DefaultConnectionHandle.java:187)

              at com.jrockit.mc.rjmx.subscription.internal.MBeanMRIMetaDataDB.lookupMBeanInfo(MBeanMRIMetaDataDB.java:130)

              at com.jrockit.mc.rjmx.subscription.internal.MBeanMRIMetaDataDB.lookupMBeanMRIData(MBeanMRIMetaDataDB.java:103)

              at com.jrockit.mc.rjmx.subscription.internal.MBeanMRIMetaDataDB.introspectMBean(MBeanMRIMetaDataDB.java:175)

              at com.jrockit.mc.rjmx.subscription.internal.MBeanMRIMetaDataDB.getMbeanData(MBeanMRIMetaDataDB.java:87)

              at com.jrockit.mc.rjmx.internal.DefaultConnectionHandle.getMBeanMetaData(DefaultConnectionHandle.java:475)

              at com.jrockit.mc.rjmx.subscription.internal.DefaultMRIMetaDataService.getMetaData(DefaultMRIMetaDataService.java:110)

              at com.jrockit.mc.rjmx.subscription.internal.MRIMetaDataWrapper.getMetaData(MRIMetaDataWrapper.java:28)

              at com.jrockit.mc.rjmx.subscription.internal.MRIMetaDataWrapper.getDisplayName(MRIMetaDataWrapper.java:43)

              at com.jrockit.mc.rjmx.ui.internal.CombinedDialsSectionPart.restoreState(CombinedDialsSectionPart.java:306)

              at com.jrockit.mc.console.ui.tabs.overview.OverviewTab.restoreState(OverviewTab.java:76)

              at com.jrockit.mc.console.ui.tabs.overview.OverviewTab.createFormContent(OverviewTab.java:63)

              at org.eclipse.ui.forms.editor.FormPage$1.run(FormPage.java:152)

              at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

              at org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:150)

              at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:241)

              at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:325)

              at com.jrockit.mc.ui.formpage.internal.ToolbarFormEditor.addPageSafe(ToolbarFormEditor.java:172)

              at com.jrockit.mc.ui.formpage.internal.ToolbarFormEditor.addFormPageContributionItem(ToolbarFormEditor.java:162)

              at com.jrockit.mc.components.ui.design.DesignEditor.doInitializeFormPageContributions(DesignEditor.java:195)

              at com.jrockit.mc.components.ui.design.DesignEditor.access$0(DesignEditor.java:191)

              at com.jrockit.mc.components.ui.design.DesignEditor$1$1.run(DesignEditor.java:156)

              at com.jrockit.mc.ui.misc.DisplayToolkit$SafeRunnable.run(DisplayToolkit.java:51)

              at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)

              at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)

              at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537)

              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)

              at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)

              at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)

              at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)

              at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)

              at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

              at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)

              at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

              at com.jrockit.mc.rcp.application.Application.start(Application.java:26)

              at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)

              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)

              at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)

              at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

              at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

            Caused by: java.lang.reflect.InvocationTargetException

              at sun.reflect.GeneratedMethodAccessor1390.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at org.glassfish.admin.mbeanserver.AdminAuthorizedMBeanServer$Handler.invoke(AdminAuthorizedMBeanServer.java:102)

              at com.sun.proxy.$Proxy544.getMBeanInfo(Unknown Source)

              at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1481)

              at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)

              at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)

              at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420)

              at javax.management.remote.rmi.RMIConnectionImpl.getMBeanInfo(RMIConnectionImpl.java:924)

              at sun.reflect.GeneratedMethodAccessor3822.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)

              at sun.rmi.transport.Transport$1.run(Transport.java:177)

              at sun.rmi.transport.Transport$1.run(Transport.java:174)

              at java.security.AccessController.doPrivileged(Native Method)

              at sun.rmi.transport.Transport.serviceCall(Transport.java:173)

              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)

              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)

              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              at java.lang.Thread.run(Thread.java:745)

            Caused by: javax.management.InstanceNotFoundException: amx:name=resources

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375)

              at com.sun.jmx.mbeanserver.JmxMBeanServer.getMBeanInfo(JmxMBeanServer.java:920)

              at com.sun.enterprise.v3.admin.DynamicInterceptor.getMBeanInfo(DynamicInterceptor.java:534)

              ... 24 more

            • 4. Re: JMC (1.7_60) always gets UndeclaredThrowableException connecting to remote MBean Server after setting up a custom chart on dashboard
              Klara Ward, Java Mission Control Dev-Oracle

              Sorry for the long wait.

               

              We will try to repro this inhouse if we can get hold of that GlassFish version.

              If you connect with JConsole, do you get the same exception ?

               

              What is the behavior of the JMC Console, does it only show the exception and nothing else?

               

              We've fixed a bunch of problems of 'misbehaving' mbeans in the past, but either we missed this case, or we made some other mistake.