Date Created: Tue 09-Aug-2011

Related Document Categories:

Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/



    Running JConsole with WebSphere 6.1 to view JMX mbeans

    JConsole working for WAS 6.1


    Exception in thread "main" java.lang.UnsatisfiedLinkError: fontmanager (libstdc++.so.5: cannot open shared object file: No such file or directory)
    at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:953)
    at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:922)
    at java.lang.System.loadLibrary(System.java:451)
    at sun.font.FontManager$1.run(FontManager.java:201)
    at java.security.AccessController.doPrivileged(AccessController.java:192)
    at sun.font.FontManager.<clinit>(FontManager.java:196)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
    at sun.java2d.SunGraphicsEnvironment.addDirFonts(SunGraphicsEnvironment.java:766)
    at sun.java2d.SunGraphicsEnvironment.registerFontsInDir(SunGraphicsEnvironment.java:646)
    at sun.java2d.SunGraphicsEnvironment.access$200(SunGraphicsEnvironment.java:87)
    at sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:207)
    at java.security.AccessController.doPrivileged(AccessController.java:192)
    at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:124)
    at sun.awt.X11GraphicsEnvironment.<init>(X11GraphicsEnvironment.java:206)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1263)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:99)
    at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Class.java:131)
    at java.awt.Toolkit$2.run(Toolkit.java:864)
    at java.security.AccessController.doPrivileged(AccessController.java:192)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:847)
    at java.awt.Toolkit.getEventQueue(Toolkit.java:1644)
    at java.awt.EventQueue.invokeLater(EventQueue.java:896)
    at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1230)
    at sun.tools.jconsole.JConsole.mainInit(JConsole.java:701)
    at sun.tools.jconsole.JConsole.main(JConsole.java:864)


    =========================

    yum install libstdc++.so.5


    ============================


    Create a script similar to this:

    #setup command line
    . /var/apps/was61nd/dmgr61/profiles/bin/setupCmdLine.sh
    echo WAS_HOME=${WAS_HOME}
    export JAVA_HOME=${WAS_HOME}/java
    echo JAVA_HOME=${JAVA_HOME}
    export CLASSPATH=${JAVA_HOME}/lib/jconsole.jar
    export CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar
    export CLASSPATH=${CLASSPATH}:${WAS_HOME}/runtimes/com.ibm.ws.admin.client_6.1.0.jar
    echo CLASSPATH=${CLASSPATH}
    export HOST=localhost
    export PORT=10007
    #PORT is typically 9100 (ORB_LISTENER_ADDRESS)

    ${JAVA_HOME}/bin/jconsole -J-Djava.class.path=${CLASSPATH} service:jmx:iiop://${HOST}:${PORT}/jndi/JMXConnector

    =========================

    Result



    This will only show read only mbeans, if you wish to access secure mbeans ie when global security is turned on, then use the following script


    #setup command line
    . /var/apps/was61nd/dmgr61/profiles/bin/setupCmdLine.sh
    echo WAS_HOME=${WAS_HOME}
    export JAVA_HOME=${WAS_HOME}/java
    echo JAVA_HOME=${JAVA_HOME}
    export CLASSPATH=${JAVA_HOME}/lib/jconsole.jar
    #Tools give us orb trace
    export CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar
    #export CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/j2ee.jar
    export CLASSPATH=${CLASSPATH}:${WAS_HOME}/runtimes/com.ibm.ws.admin.client_6.1.0.jar
    #export CLASSPATH=${CLASSPATH}:${WAS_HOME}/com.ibm.ws.webservices.thinclient_6.1.0.jar
    echo CLASSPATH=${CLASSPATH}
    export HOST=localhost
    export PORT=10007
    #PORT is typically 9100

    ${JAVA_HOME}/bin/jconsole -J-Djava.class.path=${CLASSPATH} -J-Dcom.ibm.SSL.ConfigURL="file:${WAS_HOME}/profiles/properties/ssl.client.props" -J-Dcom.ibm.CORBA.ConfigURL="file:${WAS_HOME}/profiles/properties/sas.client.props" service:jmx:iiop://${HOST}:${PORT}/jndi/JMXConnector





    You will need to authenticate with an appropriate username/password defined for the configured federated repository.

    Note you will need to have a fixpack 11 or greater applied to execute secure operations like the example below





Get my WebSphere Application Server course here >> http://www.themiddlewareshop.com/products/

Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many leading brands around the world. Steve specialises in JEE, DevOps and Thought Leadership.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

Courses

Articles

WebSphere Categories

Other Categories