Skip to content

HOWTO MoSKito and JBoss

Leon Rosenberg edited this page Sep 16, 2024 · 2 revisions

MoSKito and JBoss

Compabitility and examples

BuiltinOSProducer

The BuiltinOSProducer that delivers stats like open files and cpu usage doesn't work in JBoss. The reason is that it fails to load the following class at starttime: com.sun.management.UnixOperatingSystemMXBean.

The workaround for this is: You must edit the file /modules/sun/jdk/main/module.xml and add com/sun/management to the exported paths. Looks like this afterwards:

(...)
<dependencies>
  <system export="true">
    <paths>
      <path name="com/sun/management"/>
      <path name="com/sun/script/javascript"/>
(...)

This way the class can be loaded and the BuiltinOSProducer works as desired.

Tested with JBoss AS 7.1.1.Final "Brontes" and Moskito 2.4.1.

Background info: http://code.google.com/p/javamelody/issues/detail?id=133

Workaround provided by Ulrich Beingesser.

Clone this wiki locally