Why Are The Tomcat 4.1.24 MBean Server And Admin Tool Not Available? (Bootstrap: Service started javax.servlet.UnavailableException: MBeanServer is not available)

Michael Duffy

Additional Info
When this problem occurs, the following exception shows up in the logs on startup:

  Bootstrap: Service started
      javax.servlet.UnavailableException: MBeanServer is not available
The Tomcat Admin tool won't work, either, so the problem seems to be pretty serious.

The root cause is older JMX JARs that were put into the JAVA_HOME/jre/lib/ext directory.
Removing them solves the problem.

A "clean" install of JDK 1.4.1 will have only four JARs in this directory (dnsns.jar, ldapsec.jar, localedata.jar, and sunjce_provider.jar).

Sun offers this directory as a place to put third party JARs, but it's easy to forget about them and put yourself in "DLL Hell" when another app has JARs that conflict.

Then, as suggested by Arnold Knijn check out that the support for JMX MBean is enabled:

  <!-- Uncomment these entries to enable JMX MBeans support -->
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>