posted 9 years ago
I am trying to implement an MXBean which returns a List of Beans.
MXBean
MBean
When i try to get the attribute
It fails with a ClassCastException.
<Sep 26, 2014 11:18:32 PM CEST> <Error> <com.reddipped.sysstats.model.SystemInfoCollector> <BEA-000000> <null
java.lang.ClassCastException: [Ljavax.management.openmbean.CompositeData; cannot be cast to javax.management.openmbean.CompositeData
at com.reddipped.sysstats.model.SystemInfoCollector.run(SystemInfoCollector.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
Truncated. see log file for complete stacktrace
Anyone able to help me out how to retrieve the mbean as an MXBean attribute ?
Cheers,
Peter