ClassNotFoundException using shutdown.sh when JMxremote enabled.

Solution Verified - Updated -

Issue

When enabling the JMXremote features of the JVM on a JBoss 5.1.2 server configuration the following error is generated when calling the /bin/shutdown.sh

javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.system.server.jmx.MBeanServerBuilderImpl: java.lang.ClassNotFoundException: org.jboss.system.server.jmx.MBeanServerBuilderImpl
        at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:480)
        at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:511)
        at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:298)
        at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:213)
        at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:174)
        at sun.management.ManagementFactory.createPlatformMBeanServer(ManagementFactory.java:302)
        at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:504)
        at sun.management.jmxremote.ConnectorBootstrap.initialize(ConnectorBootstrap.java:392)
        at sun.management.Agent.startAgent(Agent.java:127)
        at sun.management.Agent.startAgent(Agent.java:239)
Caused by: java.lang.ClassNotFoundException: org.jboss.system.server.jmx.MBeanServerBuilderImpl
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:423)
        at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:465)
        ... 9 more
Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.system.server.jmx.MBeanServerBuilderImpl: java.lang.ClassNotFoundException: org.jboss.system.server.jmx.MBeanServerBuilderImpl

The following JMX related options are being pasted to the server instance on startup and no issues are being seen at startup, just when calling the shutdown.

    JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
    JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9007"
    JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"

Environment

Red Hat JBoss Enterprise Application Platform
- 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.