5 Replies Latest reply: Apr 30, 2012 5:51 PM by 931605 RSS

    bea JMX not found on startup

    931605
      The bean name is:

      com.bea:ServerRuntime=WLS1_COMMON_MS1,
      Name=DiagnosticsJMXNotificationSource,
      Type=WLDFWatchJMXNotificationRuntime,WLDFRuntime=WLDFRuntime,WLDFWatchNotificationRuntime=WatchNotification

      When I run jconsole I can see that this bean is not created early on in the clustered environment during restart and I get this exception:

      SEVERE: javax.management.InstanceNotFoundException: com.bea:ServerRuntime=WLS1_COMMON_MS1,Name=DiagnosticsJMXNotificationSource,Type=WLDFWatchJMXNotificationRuntime,WLDFRuntime=WLDFRuntime,WLDFWatchNotificationRuntime=WatchNotification
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.addNotificationListener(DefaultMBeanServerInterceptor.java:1190)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.addNotificationListener(JmxMBeanServer.java:801)
      at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$19.run(WLSMBeanServerInterceptorBase.java:511)
      ...

      Here are the different tests I've done:

      1. local windows machine, admin server, serverlet listener context initiazed - always works - I can see the bean and hook up a listener
      2. linux cluster, app cycle listener - always works
      3. linux cluster, serverlet listener context initiazed, mostly fails - can't find the com.bea... bean

      For case #3 we have an older war project that will eventually be updated to an ear but for now I don't want to
      do that because I will end up having to update around 10 of the war projects at the same time. I want to use
      the servlet context initialized for now, if it's possible.

      So, for some reason the servlet listener on linux runs early and I can't get the JMX notifications to work. I tried
      adding a thread sleep but that seems to just block the bean creation and still I see the failure. So, how can I get
      this to work?

      thanks,
      Paul.
        • 1. Re: bea JMX not found on startup
          Arunbodap-Oracle
          May be you can try changing the deployment order of your web-applications.
          Increase it from 100 (default) to may be 200 based on the number of applications and their deployment order.
          200 is just a number higher than 100. The applications with the higher number gets deployed after the applications with the lower number.

          Please check the below link for steps and further details about deployment order
          http://docs.oracle.com/cd/E21764_01/apirefs.1111/e13952/taskhelp/deployment/ChangeTheServerDeploymentOrder.html


          Arun
          • 2. Re: bea JMX not found on startup
            931605
            I tried changing the deployment order to 200 but that doesn't seem to change the outcome. I may try adding a java timer object but that seems like a hack that may not always work.

            thanks,
            Paul.
            • 3. Re: bea JMX not found on startup
              931605
              I'm seeing some strange behavior in the weblogic cluster environment. I fired up jconsole and connected to
              all of the managed servers and looked for MBeans having com.bea* and I'm seeing that at least two of
              the managed servers show no beans matching this. Is there some setting to get these beans to show up?
              I think this may be the main reason that I can't find the bean:

              com.bea:ServerRuntime=WLS1_COMMON_MS1,
              Name=DiagnosticsJMXNotificationSource,
              Type=WLDFWatchJMXNotificationRuntime,WLDFRuntime=WLDFRuntime,WLDFWatchNotificationRuntime=WatchNotification

              The entire com.bea subtree doesn't show up for some of the managed servers? I didn't create the original managed
              servers so I'm not sure what was done.

              thanks,
              Paul.
              • 4. Re: bea JMX not found on startup
                931605
                I converted the war project to an ear project and I'm still seeing the same problem - the bea.com beans don't show. I added some simple test code in postStart:

                for ( String domain : beanServer.getDomains() )
                {
                logger.info( "domain: " + domain );
                }

                on my local machine I see:

                INFO: domain: Security
                INFO: domain: com.sun.management
                INFO: domain: JMImplementation
                INFO: domain: com.oracle.jdbc
                INFO: domain: com.bea

                and on the cluster w/ many managed servers I see:

                INFO: domain: JMImplementation
                INFO: domain: oracle.jrockit.management
                INFO: domain: com.sun.management
                INFO: domain: com.oracle.jrockit
                INFO: domain: com.oracle.jdbc
                INFO: domain: java.lang
                INFO: domain: java.util.logging

                So, the bea.com domain is missing? Is there some way to get this domain to be available?

                thanks,
                Paul.
                • 5. Re: bea JMX not found on startup
                  931605
                  I think I figured out the solution:

                  I was using:

                  beanServer = ManagementFactory.getPlatformMBeanServer();

                  and I changed it to:

                  beanServer = MBeanServer.class.cast( ctx.lookup( "java:comp/jmx/runtime" ) );

                  The first statement works on my local dev machine but fails on the linux cluster. The second works on both, at least running under weblogic. When I run an isolated junit test then I have to use the first statement.

                  Paul.