JMX jconsole -- where is my MBean?

I'm missing something here in 5.0b2's JMX. I've put together a rudimentary standard MBean together, and want to view the data from jconsole (on the MBeans tab). Here's the code I used below to register the MBean.
String domain = "UserDomain";
String mbeanClassName = "iccs.support.utilities.corba.ConnectionManagementInfo";
MBeanServer mbs = MBeanServerFactory.createMBeanServer();
ObjectName mbeanObjectName = new ObjectName(domain + ":type=" + mbeanClassName);
mbs.createMBean(mbeanClassName, mbeanObjectName);
This compiles and runs without error. I can connect to the process with jconsole successfully, but nothing shows up on the tab. I'm finding little documentation to help me out with this very simple case. Am I missing something?

It seems your MBean server has no RMI connector or protocol adaptor attached.
If you don't want the trouble to create an RMI connector use the JVM platform MBean server:
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();

Similar Messages

  • Does jconsole support monitoring of MBeans registered to New MBean Server?

    I see that jconsole is displaying the MBeans registered to Platform MBean Server (obtained through java.lang.ManagementFactory.getPlatformMBeanServer()) but not the MBeans that are registered to a newly created MBean Server (created using javax.management.MBeanServerFactory.createMBeanServer()).
    Is there a way through which I can view the MBeans registered to newly created MBean Server in the jconsole?

    Thank you for the information emcmanus.
    So what I understand is that the jconsole if opened in a normal way (i.e. Local), it loads MBeans by looking up the Platform MBean Server.
    All the MBeans belonging to other MBean Servers or custom created MBean Servers can be managed & monitored if jconsole is loaded using Advanced option (i.e. providing JMX URL) and with the help of remote connectors.
    When I open Platform MBean Server, I dont see MBeans of other MBean Server and vice versa. (I think they are mutually exclusive).
    Please correct me if what I have mentioned above is incorrect.
    One confusing thing is that I see "JVImplementation" MBean is available when I open jconsole with either of the two option mentioned above.
    Is there any specific reason for that?
    Is that MBean part of Platform MBean Server or some other MBean Server?

  • Jconsole can't access MBeans in windows XP

    I developed a sample Mbean and started in windowsXP. when i started jconsole it is not showing any java process. but the same code runs in linux fine. The jconsole in the windows xp can access the MBeans running in Linux . My temp dir is in FAT32. I tried to acees the MBeans running in windows XP using jconsole in linux but that was in vain. I disabled authentication and ssl.
    plz help me!!!!!!!!!!!!!!!

    Hi,
    Sorry for the late reply - with the summer time it seems that many messages
    have slipped through my attention ;-(
    I cannot answer your question directly for lack of information on the specific
    problem you're experiencing.
    You may want however to use the information provided here:
    http://blogs.sun.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole
    in order to figure out what is happening.
    If your agent has security enabled you may want to have a look at the new
    JMX advanced example that's been added to JDK 6 build 96 (you will need
    JDK 6 to run the example) - see here:
    http://blogs.sun.com/jmxetc/entry/an_advanced_jmx_example_for
    Hope this helps,
    -- daniel

  • WLS10gR3 JMX/JConsole BROKEN?

    Hey *,
    in order to expose MBean-Values and operations to my monitoring solution (Nagios) I want to first browse through my OSB/WLS MBeans using JMX tools like JConsole oder MC4j.
    However, it seems that JMX in 10gR3 does not work correctly due to some JDK Bugs.
    see here:
    http://blogs.sun.com/jmxetc/entry/proxying_a_jmx_connection_adapting
    http://forums.sun.com/thread.jspa?threadID=5233754
    Is there a patch around how to access the MBeans in WLS10gR3? I think it should affect a lot of personel and so should be a common problem right?
    grtx,
    \thomas!

    Well. This was a little bit too optimistic. In JDK1.6.0_u13 JConsole connects now well to my WebLogic Server, but it still does not work. Same thing in MC4j.
    The MBeans are listed in the tree, however operating on them does not work. It gives me an ClassNotFoundException just when I want to open an MBean - Unfortunately, the missing class is not mentioned...
    any comments?
    grtx,
    \thomas

  • JMX - Accessing ServletContext in an MBean implementation

    How do you access the ServletContext from a class that implements an MBean interface? My application stores logs in application scope (ServletContext) and I need to access those logs from my MBean implementation.
    public class Stats implements StatsMBean {
    // How do I access ServletContext here?
    }Any ideas?

    How aboutpublic class Stats implements StatsMBean {
      private ServletContext context;
      public Stats(ServletContext context) {
        this.context = context;
      // some methods that can now use the "context" variable.
    }

  • Where can I get the source code of the jconsole in jdk1.5

    Where can I get the source code of the jconsole in jdk1.5?

    Hi,
    The JConsole 5 source code is not publicly available but you can get JConsole 6/7 source code from http://openjdk.java.net.
    Regards,
    Luis-Miguel Alventosa - JMX/JConsole dev team - http://blogs.sun.com/lmalventosa

  • Trouble Registering Custom MBean in WLS 6.1 (Example from JMX Guide)

    Hi there,
    I have trouble getting an example to work provided in the BEA Manual
    "Programming WebLogic JMX Services". The example of registering a
    custom MBeans produces in my case:
    java -cp .;C:\bea\wlserver6.1\lib\weblogic.jar jmx.dummy.MyClient
    Getting BEA MBean Server
    Using domain: weblogic
    Create object name
    Create MBean Dummy within MBean Server
    Could not create MBean Dummy
    java.rmi.UnmarshalException: error unmarshalling arguments; nested
    exception is:
    java.lang.ClassNotFoundException: jmx.dummy.MyClient
    java.lang.ClassNotFoundException: jmx.dummy.MyClient
    <<no stack trace available>>
    --------------- nested within: ------------------
    weblogic.rmi.extensions.RemoteRuntimeException - with nested
    exception:
    [java.rmi.UnmarshalException: error unmarshalling arguments; nested
    exception is:
            java.lang.ClassNotFoundException: jmx.dummy.MyClient]
    at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:60)
    at $Proxy2.registerMBean(Unknown Source)
    at jmx.dummy.MyClient.registerMBean(MyClient.java:57)
    at jmx.dummy.MyClient.main(MyClient.java:19)
    I have a custom MBean: MyCustomMBean:
    package jmx.dummy;
    public interface MyCustomMBean
    public int      getAttribute();
    and it's implementation class MyClient listed below. Does anybody know
    what I'm doing wrong ?
    Greetings,
    Alex
    package jmx.dummy;
    import weblogic.management.MBeanHome;
    import weblogic.management.Helper;
    import weblogic.management.RemoteMBeanServer;
    import javax.management.*;
    public class MyClient implements MyCustomMBean, java.io.Serializable
    MBeanServer server = null;
    ObjectName mbo = null;
    String mbeanName = null;
    public static void main(String[] args)
    MyClient client = new MyClient();
    client.createMBeanServer();
    client.registerMBean();
    client.getMBeanInfo();
    private void createMBeanServer()
    MBeanHome mbh =
    Helper.getMBeanHome("system","beabeabea","t3://localhost:7001","petstoreServer");
    echo("Getting BEA MBean Server");
    server = mbh.getMBeanServer();
    if (server == null)
    echo("Server is null");
    System.exit(2);
    private void registerMBean()
    String domain = server.getDefaultDomain();
    echo("Using domain: " + domain);
    mbeanName = new String("Dummy");
    try
    echo("Create object name");
    mbo = new ObjectName(domain + ":type="+mbeanName);
    catch (MalformedObjectNameException e1)
    echo("MalformedObjectNameException");
    e1.printStackTrace();
    System.exit(1);
    echo("Create MBean " + mbeanName + " within MBean Server");
    try
    //server.createMBean(mbeanName,mbo);
    server.registerMBean((Object) new MyClient(), mbo);
    catch (Exception e)
    echo("Could not create MBean " + mbeanName);
    e.printStackTrace();
    System.exit(1);
    private void getMBeanInfo()
    echo("getting management information for "+mbeanName);
    MBeanInfo info = null;
    try
    info = server.getMBeanInfo(mbo);
    catch (Exception e)
    echo("could not get MBeanInfo object for "+mbeanName);
    e.printStackTrace();
    return;
    echo("CLASSNAME: \t"+info.getClassName());
    echo("DESCRIPTION: \t"+info.getDescription());
    echo("ATTRIBUTES: todo ....");
    echo("\n\n");
    try
    echo("Get MBean Values:");
    String state = (String)
    server.getAttribute(mbo,"MyAttribute");
    catch (Exception e)
    echo("Could not read attributes");
    e.printStackTrace();
    return;
    echo("End of DEMO");
    private void echo(String error)
    System.out.println(error);
    public int getAttribute()
    return 3434;

    Hi, i'm using wl 6.0 on HPunix.
    And.. we don't have any serverclasses folder. :(
    Audun
    [email protected] (Alex) wrote:
    OK, I got it working. Will answer it here in case somebody else has a
    problem. Editing the CLASSPATH of WLS did not work for me but putting
    my classes in ./config/serverclasses/ did the trick. But then I
    encountered another problem, new exception that my code was not JMX
    compliant. Seperating the MBean implementation for the MyClient class
    to a new class worked:
    new class MyCustom:
    package jmx.dummy;
    public class MyCustom implements
    jmx.dummy.MyCustomMBean,java.io.Serializable
    public int getMyAttribute()
    return 3434;
    untouched MyCustomMBean class:
    package jmx.dummy;
    public interface MyCustomMBean
    public int      getMyAttribute();
    edited MyClient class:
    package jmx.dummy;
    import weblogic.management.MBeanHome;
    import weblogic.management.Helper;
    import weblogic.management.RemoteMBeanServer;
    import javax.management.*;
    public class MyClient
    MBeanServer server = null;
    ObjectName mbo = null;
    String mbeanName = null;
    public static void main(String[] args)
    MyClient client = new MyClient();
    client.createMBeanServer();
    client.registerMBean();
    client.getMBeanInfo();
         client.unregister();
    private void createMBeanServer()
    MBeanHome mbh =
    Helper.getMBeanHome("system","beabeabea","t3://localhost:7001","examplesServer");
    echo("Getting BEA MBean Server");
    server = mbh.getMBeanServer();
    if (server == null)
    echo("Server is null");
    System.exit(2);
    private void registerMBean()
    String domain = server.getDefaultDomain();
    echo("Using domain: " + domain);
    mbeanName = new String("MyCustomMBean");
    try
    echo("Create object name");
    mbo = new ObjectName(domain + ":type="+mbeanName);
    catch (MalformedObjectNameException e1)
    echo("MalformedObjectNameException");
    e1.printStackTrace();
    System.exit(1);
    echo("Create MBean " + mbeanName + " within MBean Server");
    try
    //server.createMBean(mbeanName,mbo);
    server.registerMBean((Object) new MyCustom(), mbo);
    catch (Exception e)
    echo("Could not create MBean " + mbeanName);
    e.printStackTrace();
    System.exit(1);
    private void getMBeanInfo()
    echo("getting management information for "+mbeanName);
    MBeanInfo info = null;
    try
    info = server.getMBeanInfo(mbo);
    catch (Exception e)
    echo("could not get MBeanInfo object for "+mbeanName);
    e.printStackTrace();
    return;
    echo("CLASSNAME: \t"+info.getClassName());
    echo("DESCRIPTION: \t"+info.getDescription());
    echo("ATTRIBUTES: todo ....");
    echo("\n\n");
    try
    echo("Get MBean Values:");
    String state =
    (server.getAttribute(mbo,"MyAttribute")).toString();
    System.out.println("state is "+state);
    catch (Exception e)
    echo("Could not read attributes");
    e.printStackTrace();
    return;
    echo("End of DEMO");
    private void echo(String error)
    System.out.println(error);
    public int getAttribute()
    return 3434;
    private void unregister()
    try
    server.unregisterMBean(mbo);
    catch (Exception e)
    echo("could not unregister mbean");
    [email protected] (Alex) wrote in message news:<[email protected]>...
    Hi there,
    I have trouble getting an example to work provided in the BEA Manual
    "Programming WebLogic JMX Services". The example of registering a
    custom MBeans produces in my case:
    java -cp .;C:\bea\wlserver6.1\lib\weblogic.jar jmx.dummy.MyClient
    Getting BEA MBean Server
    Using domain: weblogic
    Create object name
    Create MBean Dummy within MBean Server
    Could not create MBean Dummy
    java.rmi.UnmarshalException: error unmarshalling arguments; nested
    exception is:
    java.lang.ClassNotFoundException: jmx.dummy.MyClient
    java.lang.ClassNotFoundException: jmx.dummy.MyClient
    <<no stack trace available>>
    --------------- nested within: ------------------
    weblogic.rmi.extensions.RemoteRuntimeException - with nested
    exception:
    [java.rmi.UnmarshalException: error unmarshalling arguments; nested
    exception is:
    java.lang.ClassNotFoundException: jmx.dummy.MyClient]
    at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:60)
    at $Proxy2.registerMBean(Unknown Source)
    at jmx.dummy.MyClient.registerMBean(MyClient.java:57)
    at jmx.dummy.MyClient.main(MyClient.java:19)
    I have a custom MBean: MyCustomMBean:
    package jmx.dummy;
    public interface MyCustomMBean
    public int      getAttribute();
    and it's implementation class MyClient listed below. Does anybody know
    what I'm doing wrong ?
    Greetings,
    Alex
    package jmx.dummy;
    import weblogic.management.MBeanHome;
    import weblogic.management.Helper;
    import weblogic.management.RemoteMBeanServer;
    import javax.management.*;
    public class MyClient implements MyCustomMBean, java.io.Serializable
    MBeanServer server = null;
    ObjectName mbo = null;
    String mbeanName = null;
    public static void main(String[] args)
    MyClient client = new MyClient();
    client.createMBeanServer();
    client.registerMBean();
    client.getMBeanInfo();
    private void createMBeanServer()
    MBeanHome mbh =
    Helper.getMBeanHome("system","beabeabea","t3://localhost:7001","petstoreServer");
    echo("Getting BEA MBean Server");
    server = mbh.getMBeanServer();
    if (server == null)
    echo("Server is null");
    System.exit(2);
    private void registerMBean()
    String domain = server.getDefaultDomain();
    echo("Using domain: " + domain);
    mbeanName = new String("Dummy");
    try
    echo("Create object name");
    mbo = new ObjectName(domain + ":type="+mbeanName);
    catch (MalformedObjectNameException e1)
    echo("MalformedObjectNameException");
    e1.printStackTrace();
    System.exit(1);
    echo("Create MBean " + mbeanName + " within MBean Server");
    try
    //server.createMBean(mbeanName,mbo);
    server.registerMBean((Object) new MyClient(), mbo);
    catch (Exception e)
    echo("Could not create MBean " + mbeanName);
    e.printStackTrace();
    System.exit(1);
    private void getMBeanInfo()
    echo("getting management information for "+mbeanName);
    MBeanInfo info = null;
    try
    info = server.getMBeanInfo(mbo);
    catch (Exception e)
    echo("could not get MBeanInfo object for "+mbeanName);
    e.printStackTrace();
    return;
    echo("CLASSNAME: \t"+info.getClassName());
    echo("DESCRIPTION: \t"+info.getDescription());
    echo("ATTRIBUTES: todo ....");
    echo("\n\n");
    try
    echo("Get MBean Values:");
    String state = (String)
    server.getAttribute(mbo,"MyAttribute");
    catch (Exception e)
    echo("Could not read attributes");
    e.printStackTrace();
    return;
    echo("End of DEMO");
    private void echo(String error)
    System.out.println(error);
    public int getAttribute()
    return 3434;

  • Can JConsole connect to remote JMX agent using JMXMP and TLS?

    I have a JMX Enabled App that needs to be accessed with JConsole using TLS enabled JMXMP Connector.
    The same server can be accessed with a custom JMX client but JConsole is causing be trouble.
    I get error something like: "Client does not support profiles but the server requires it..."
    thanks
    Srini

    <p>Hi John,</p>
    <p>Unfortunately there isn't a simple solution for this because you cannot pass to JConsole the environment map to be used to configure your JMXMP connector client.</p>
    <p>In order to achieve that you will have to write your own JMXMP connector client provider (e.g. service:jmx:<b>secure-jmxmp</b>://host:port) that initializes the environment map with the appropriate security settings and then rewrites the JMXServiceURL to service:jmx:<b>jmxmp</b>://host:port and delegates to the existing JMXMP connector client provider.</p>
    <p>Of course, you will have to supply the javax.net.ssl.* SSL system properties in the command-line as you already do.</p>
    <p>Have a look at the JMX class JMXConnectorProvider for more detailed info.</p>
    <p>Regards,<br>
    Luis-Miguel Alventosa<br>
    Java SE JMX/JConsole development team<br>
    Sun Microsystems, Inc<br></p>

  • What JMX is in reality ?

    Hi,
    I'm working on a very complex software project design. For my project, a monitoring tool will be crucial ; that's why I'm trying to understand what JMX is. But, I did not find any document explaining what JMX is in reality.
    I have three crucial questions :
    1) What JMX is in reality ? Do someone know concrete and real situations where JMX has been used and How ?
    2) What really is the difference between MBeans and EJBs ?
    3) Could I use JMX wnhen in my architecture when there is 50% J2EE and 50% .NET ?
    Thanks in advance for any helpful feedback.

    1) What JMX is in reality ? JMX is a technology that lets you implement management interfaces for
    Java application.
    The Management Interface is composed of named objects - called MBeans
    (Management Beans). MBeans are registered with a name in an MBeanServer.
    The content of the MBeanServer can then be exposed through various
    protocols, implemented by protocol connectors, or protocol adaptors.
    A protocol connector (e.g. the JMX RMI Connector) exposes the MBeans
    as they are - so a remote client sees the same model than a local client.
    A protocol adaptor (e.g. an SNMP adaptor) performs (or provides hooks to
    let you perform) a model mediation - to adapt the model to what a client
    of that protocol (e.g. SNMP Manager) would expect to see.
    Today there is one standard connector defined for JMX - which is the
    RMI Connector, and comes in two flavors: RMI/JRMP and RMI/IIOP.
    There's also a JMX WebServices Connector in the making - which is being
    defined by JSR 262.
    http://www.jcp.org/en/jsr/detail?id=262
    https://ws-jmx-connector.dev.java.net
    There are also a number of non-standard connectors, either free or commercial
    that have been implemented by the community.
    More on JMX:
    http://blogs.sun.com/jmxetc/entry/looking_for_jmx_overview_examples
    Do someone know concrete
    and real situations where JMX has been used and How
    ?You will find more on tools/products using JMX on the JMX Home Page:
    http://java.sun.com/products/JavaManagement/index.jsp
    Among other things, JMX is used today to manage the JVM itself. It is also
    widely used in the management of application servers.
    See:
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html#manage
    http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html
    http://weblogs.java.net/blog/mandychung
    Understanding JMX Technology
    http://java.sun.com/developer/EJTechTips/2005/tt0222.html#1
    Getting Started with Java Management Extensions (JMX): Developing Management and Monitoring Solutions
    http://java.sun.com/developer/technicalArticles/J2SE/jmx.html
    Managing and Monitoring Web Services in Project GlassFish
    http://developers.sun.com/prodtech/appserver/reference/techart/ws_mgmt.html
    Using Custom MBeans to Extend the GlassFish Administration System
    http://java.sun.com/developer/EJTechTips/2006/tt0327.html#2
    2) What really is the difference between MBeans and
    EJBs ?An EJB lives in an Application Server container. It usually implement business
    logic. An MBean lives in an MBeanServer, and usually implement management
    logic (configuration, monitoring, etc)...
    3) Could I use JMX wnhen in my architecture when
    there is 50% J2EE and 50% .NET ?I am not a .NET user so I'm afraid I can't provide much advice here.
    It may depends on the means you have to reach out for your .NET resources
    from within your Java/JMX application. If you know how to get at your .NET
    resources from Java, then it should be easy to expose them through JMX.
    hope this helps,
    -- daniel
    JMX, SNMP, Java, etc...
    http://blogs.sun.com/jmxetc
    Thanks in advance for any helpful feedback.Message was edited by:
    dfuchs: see also http://blogs.sun.com/jmxetc/entry/what_is_jmx

  • How can I discover the MBeans in the JVMs in the local host?

    I'm new to the JMX world and am trying to figure out how to get my JMX client to discover the MBeanServers in the local host, just like jconsole does.
    In more detail, I have a JMX client running in machineA that I want to use to talk to MBeans in 4 other JVMs also running in machineA. I can get the system to work if I use the -Dcom.sun.management.jmxremote and -Dcom.sun.management.jmxremote.port options specifying an RMI port for access. However, I would like to have it work the same way it does with jconsole, where only the -Dcom.sun.management.jmxremote flag is necessary and it seems to automagically discover all the MBeanServers in the local machine.
    I've waded through a few tutorials, the API and searched this forum but could not find any hints on how to do this.
    Any help would be appreciated,
    - Alex

    Hi,
    JConsole uses the attach API to connect to the platform MBeanServer of a local java process.
    See the ConnectionArgs class shown here for an example of using the Attach API:
    [http://blogs.sun.com/jmxetc/entry/how_to_retrieve_remote_jvm |http://blogs.sun.com/jmxetc/entry/how_to_retrieve_remote_jvm ]
    -- daniel
    [http://blogs.sun.com/jmxetc|http://blogs.sun.com/jmxetc]

  • How to see registered mbeans in weblogic server 10.3.3.0 in web console

    Hi ,
    I am new in mbeans registration in weblogic. I have written code to registered mbeans in weblogic server 10.3.3.0. And I have successfully configured this through weblogic. I can see my registered mbeans in JConsole. I have referred the below link to get help of registering my mbeans :
    https://blogs.oracle.com/WebLogicServer/entry/developing_custom_mbeans_to_ma
    My problem is :_ I can not ask my client to check or do some modification through JConsole. The solution which I was looking for this, If we could get some way to see those registered mbeans through web console such as Weblogic administration console. Is there any way to make this possible ? Do we have any configuration in weblogic server through which I can see my registered mbeans through web console.
    Or By goggling, I found we can use JMX console to registered our mbeans. But I do not have any idea how?
    I am rigorously looking for help. Thanks in advance who come forward to help me.
    Regards,
    Niraj Kumar Singh

    Niraj,
    According to [url http://docs.oracle.com/cd/E12840_01/wls/docs103/jmxinst/accesscust.html#wp1107240]the docs, you cannot access mbeans through the WLS console. JConsole is a JMX console, so you do know how already :)
    If you have Enterprise Manager (aka Fusion Middleware Control) installed in your domain, you can use that to see the mbeans as well.
    John

  • Coherence MBean not registering

    Hi,
    We are using coherence with WLS9.1 and Coherence 3.3.1 On Solaris 10. We start Tangosol by calling DefaultCacheServer.start() in WLS Application Life Cycle. When I openup JConsole, I see Coherence MBean.
    We removed WLS Application Lifecycle and replaced it with SpringContextListener and WSSpringServlet.
    -- Pre Start is called in contextInitialzed() of SpringContextListener
    -- Post Start is called in init of WSSpringServlet
    -- Post Stop is called in contextDestroyed() of SpringContextListener
    Now when i start the server, I do not see Coherence MBean anymore.
    I tried downloadeding jmx-console app from oracle website, and it couldn't find MBeans, meaning that Coherence MBeans was not available.
    Any one know, why this is happening or Am I doing something wrong?
    My TANGOSOL OPTIONS:
    -Dtangosol.coherence.cacheconfig=coherence-cache-config.xml -Dtangosol.coherence.clusteraddress=xxx.xxx.xxx.xxx -Dtangosol.coherence.clusterport=9001 -Dtangosol.coherence.ttl=2 -Dtangosol.coherence.management=all -Dtangosol.coherence.management.remote=true -Dtangosol.coherence.management.readonly=true -Dtangosol.coherence.log=log4j -Dtangosol.coherence.log.level=5 -Dtangosol.coherence.log.limit=4096 -Dtangosol.coherence.replicated.request.timeout=120000 -Dtangosol.coherence.optimistic.request.timeout=120000 -Dtangosol.coherence.hibernate.cacheconfig=coherence-cache-config.xml -Dtangosol.coherence.hibernate.lockattemptmillis=60000 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9003 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
    Thanks,
    Tim
    Edited by: user10967321 on Apr 20, 2010 1:56 PM

    After digging through the configuration, I found the following:
    Earlier we extraced all the jars (including coherence.jar and tangosol.jar) to a folder and that folder was added to classpath during server startup. We also had the jars in the ear. Since we had ApplicationLifecycle impemented, we did not see any issues.
    The moment we removed the ApplicationLifeCycle and change it to contextlistener and servlet, there was some class conflicts since the jars were both in a folder outside that was in classpath as well as jars being inside ear.
    So we removed the jars from outside folder as well as removed the folder from classpath during server startup.
    Now coherence starts fine with application using DefaultCacheServer.start() and I am able to put/get entries fron cache.
    Only thing I don't see is that MBeans don't show up in JConsole or any JMX Viewer.
    I am not sure if we have to have coherence.jar and tangosol.jar explicity defined in classpath?
    Any ideas?
    Edited by: Tim 2010 on Apr 21, 2010 10:43 AM

  • Enterprise monitoring using JMX

    Hello,
    So, my company has a lot of J2EE/Tomcat servers running on java 1.6. I'm trying to find a way to monitor them all via JMX from a centralized system, which would be accessible to multiple users (web based, ideally).
    Based on my understanding of JMX, it should be possible to extract the data we need from each JVM. I have been using JConsole to do this on an ad-hoc basis when we have problems with a particular JVM and it's great.
    But I can't seem to find any good software for doing enterprise-wide monitoring and long-term data collection... can anyone suggest a good package, either free/open-source (ideally) or commercial?
    Basically, I want to be able to:
    * collect CPU, memory, DB (hibernate), HTTP request stats, etc. via JMX and archive it
    * view graphs of the above
    * ideally, we could also receive email alerts if certain conditions were met, e.g. memory almost full.
    As a side note:
    We're already using Zenoss (http://www.zenoss.com) to monitor the OS-level stuff and we really like it, but we need more visibility into each JVM (we have multiple JVMs per physical server). As far as I can tell, Zenoss doesn't support JMX monitoring... but has anyone found a way to make this work? If so, I'd love to hear about it, since this would be ideal for me.

    You may want to have a look at Glassbox, an open source troubleshooting agent for pinpointing problems in Enterprise Java applications.
    http://www.glassbox.com
    It offers both JMX and web-based access to the collected data but I'm not sure the web-based console allows you to present the collected data graphically. But still you could write your own JConsole plugins and display the collected
    data coming from Glassbox and your own custom MBeans in a graphical way but of course JConsole is Swing-based.
    Have a look at the JavaOne 2007 Hands-On Lab 1420 to get more detailed info about using Glassbox/JMX/JConsole together.
    http://blogs.sun.com/lmalventosa/entry/j1_07_hol_1420
    Regards,
    Luis-Miguel Alventosa
    Java SE JMX/JConsole development team
    Sun Microsystems, Inc.
    http://blogs.sun.com/lmalventosa/

  • Coherence Cache metrics/stats collection logic/tool- Not JConsole,RTViewOCM

    Hi,
    am looking for any tools/3rd party solutions to interface with Cache Server and Cache Client Nodes/Agents to obtain stats,metrics etc.
    I know you can use JMX JConsole or use RTView for OCM to view them, but I'd like to build something on my own by interfacing with the Cache nodes and build a report by myself, which I can use with an analytical tool,portal-jsp or equivalent.
    How do you do it or are there any APIs to do this?
    How does JMX JConsole do this? Can I hack JConsole to get this stats to build on my own?
    excuse me for my limited knowlwedg on JMX and coherence

    Hi,
    no need to hack anything. JMX is a public and well-documented protocol, and making Coherence expose its management JMX interface is also documented. You should probably start with reading up on JMX in general. You should also read the following link:
    http://wiki.tangosol.com/display/COH33UG/Managing+Coherence+using+JMX
    Finally you should look at the Javadoc of the com.tangosol.net.management.Registry interface for the available MBeans provided by Coherence.
    Best regards,
    Robert

  • JMX: Invalid character '*' in key part of property

    Hi:
    While trying to retrieve the model mbean attributes, I am seeing
    the following exception --
    javax.management.MalformedObjectNameException: Invalid character '*' in key part of property
    at javax.management.ObjectName.construct(ObjectName.java:459)
    at javax.management.ObjectName.<init>(ObjectName.java:1304)My ModelMBean extends the DefaultModelMBeanProvider class.
    The mbean is registered correctly with the mbean server, i notice the succesful registration when i deploy the application to the application server.
    The following code registers the mbean programmatically with the mbean server
    ObjectName name = null;
    name = new ObjectName(":type=myManager,name=myConfig");
    // register MBean. It is registered under a domain
    // named after the application that registered it
    factory.registerMBean(name, <instance of the mbean class>)
    Now, to retrieve the attributes of the mbean, I am querying for my MBean using the following API
    ObjectName oname = SDKJMXUtil.queryName(mgmt, new ObjectName(appName+":type=myManager,name=myConfig, *"), null);
    where
    SDKJMXUtil.queryName(....) is ..
    * Perform a JMX query for a single MBean and return the
    * ObjectName of the MBean. <p> Throws an IASException if the
    * query fails, or if conn is null, or if the number of mbeans
    * returned in the query result is not one.
    * @param conn JMXConnection used to perform query
    * @param oname The ObjectName used in query
    * @param exp The QueryExp used in query (can be null)
    * @throws IASRuntimeException if there was an error querying the MBeans, or if 0 or multiple MBeans were found.
    public static ObjectName queryName(JMXConnection conn, ObjectName oname, QueryExp exp)
    Set objects;
    try
    objects = conn.queryNames(oname, exp);
    catch (IOException e)
    throw new IASRuntimeException("Error performing JMX query",
    IASErr.class.getName(),
    IASErrID.JMX_QUERY_ERROR,
    e);
    if (objects == null || objects.size() < 1)
    throw new IASRuntimeException("MBean not found",
    IASErr.class.getName(),
    IASErrID.MBEAN_NOT_FOUND,
    null);
    else if (objects.size() > 1)
    throw new IASRuntimeException("More than one MBean found",
    IASErr.class.getName(),
    IASErrID.TOO_MANY_MBEANS_FOUND,
    null);
    return (ObjectName)objects.iterator().next();
    Please let me know why I am sesing the javax.management.MalformedObjectNameException: Invalid character '*' in key part of property exception.
    Thanks much.
    -NB.

    Hi,
    There's a forum dedicated to JMX - You can subscribe
    to this JMX-FORUM from here: http://archives.java.sun.com
    Concerning your question please see below:
    Hi:
    While trying to retrieve the model mbean attributes,
    I am seeing
    the following exception --
    javax.management.MalformedObjectNameException:
    Invalid character '*' in key part of property [...]
    new ObjectName(appName+":type=myManager,name=myConfig, *")The problem is that's there is a white space ' ' between ',' and '*'.
    There are no delimiter characters in JMX ObjectName ' ' has no
    special meaning and isn't ignored - so ' *' is interpreted
    as being a key containing a white space and a star. Star is a special character
    which can't be part of a key, hence the MalformedObjectNameException.
    Try with:
    new ObjectName(appName+":type=myManager,name=myConfig,*")
    and it should work.
    Hope this helps,
    -- daniel
    http://blogs.sun.com/roller/page/jmxetc
    Please let me know why I am sesing the
    javax.management.MalformedObjectNameException:
    Invalid character '*' in key part of property
    exception.

Maybe you are looking for

  • InDesign Table of Contents won't display once exported to pdf

    Hello, I am creating user manuals using Indesign books with CS5. When I export the book, I can view everything perfectly. But when I open the same file from a different computer, I get a message saying: "An error exists on this page. Acrobat may not

  • Need to update resource name in user XML

    Hi Friends, I Need to update resource name in user XML. Suppose I have one user say 120120 and he has resource "ABC" assinged to him. When I rename resource "ABC" to "XYZ" and search the user 120120, it is showing me "XYZ" resource is assinged to 120

  • PPOME custom infotype

    Dear friends, I have added custom OM infotype in PPOME as a new tab page. if i create any organisational unit in ppome, i want to know the immidiate parent organisational unit (ie. Objid of the parent org unit) of this newly created org unit. Also if

  • RF with ECC 6.0 WM

    Hi all, I have some basic queries related to RF Devices ( Barcode & RFID  Handheld devices ) usage with SAPWebConsole. Please find the same as follows: 1.Is SAPWebConsole is free package with SAP ECC 6.0 WM? If no, can somebody please provide detaile

  • Windows won't close, lockups, drop down menu bar not working - IE works fine - what's going on with firefox?

    Just bad performance from firefox the past couple of weeks I down loaded a fresh version of firefox, but it didn't help see above question Lockups, windows won't close, drop down menus not working Internet Explorer works fine