closed NoClassDefFoundError: com.sun.management.OperatingSystemMXBean at ...Performance.getHealthCheck(Performance.java:127)

0 votes
asked Aug 1, 2014 in Bug by alberto (140 points)
closed Oct 14, 2014 by alberto

The method net.sourceforge.plantuml.api.Performance.getHealthCheck(), in Line 127 uses the  com.sun.management.OperatingSystemMXBean class, that isn't included in all jvm.  A previous test like:

 

final Class cl = Class.forName("com.sun.management.OperatingSystemMXBean");
if (cl == null) {
   Log.info("Cannot load com.sun.management.OperatingSystemMXBean");
   jvmCpuTime = -1;
} else if (...)
 
could prevent the code from breaking up.
closed with the note: Fixed (tested with attached plantuml version and with plantuml.8008+)

2 Answers

+1 vote
answered Aug 17, 2014 by plantuml (298,440 points)
selected Oct 14, 2014 by alberto
 
Best answer
We have made a beta that should correct this :

https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

Could you test it and tell us if it's fine for you ?

Thanks,
commented Oct 9, 2014 by alberto (140 points)
Sorry for the delayed answer: vacations and a different project have kept me busy in other fronts. I'll give it a try as soon as I can.
commented Oct 14, 2014 by alberto (140 points)
I confirm that this error is fixed in both your embedded version and in version 8008. I'm closing this ticket. Thank you.
0 votes
answered Aug 7, 2014 by plantuml (298,440 points)
Thanks for the report.

We will fix this in next official release.

Regards,
...