-
Notifications
You must be signed in to change notification settings - Fork 68
HOWTO MoSKito and JBoss
Leon Rosenberg edited this page Sep 16, 2024
·
2 revisions
- Tested successfully with MoSKito version 2.2.1 and JBoss 7.1.1
- Example project: https://github.com/anotheria/moskito-jboss
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.