来源: JProfiler against JBossAS 6.x fails to boot | JBoss Developer

Problem

When using JProfiler (5.x or 6.x) with JBoss AS 6.0.x or later, you will see this exception during the server boot:

  1. 14:06:58,531 ERROR [AbstractKernelController] Error installing to
  2. Configured: name=ServiceBindingManager state=Configured:
  3. java.lang.Exception: Error calling callback JMXRegistrationAdvice for
  4. target context ServiceBindingManager
  5.          at
  6. org.jboss.dependency.plugins.AbstractLifecycleCallbackItem.install(AbstractLifecycleCallbackItem.java:91)
  7.          at
  8. org.jboss.dependency.plugins.AbstractController.handleLifecycleCallbacks(AbstractController.java:1830)
  9.          at
  10. Caused by: javax.management.InstanceNotFoundException:
  11. JMImplementation:type=MBeanRegistry
  12.          at
  13. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
  14.          at
  15. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
  16.          at
  17. com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
  18.          at
  19. org.jboss.system.microcontainer.jmx.ServiceControllerRegistrationLifecycleCallback.install(ServiceControllerRegistrationLifecycleCallback.java:96)
  20.          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  21.          at
  22. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  23.          at
  24. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  25.          at java.lang.reflect.Method.invoke(Method.java:597)
  26.          at

 

 

Workaround

Edit the JBoss AS startup script run.conf (for Windows OS, edit the run.conf.bat) and through the JAVA_OPTS pass the following two system properties:

-Djboss.platform.mbeanserver -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl

 

For example, after changes, the JAVA_OPTS section will look like:

JAVA_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.platform.mbeanserver -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注