pinpoint-apm/pinpoint · warning
Expected method not found for retrieving system cpu usage. C
Error message
Expected method not found for retrieving system cpu usage. Cause : {} What it means
Same probe pattern as the JVM CPU provider, but for the system-wide CPU usage provider in DefaultCpuLoadMetric (IBM variant). If the OperatingSystemMXBean lacks the expected system CPU method, NoSuchMethodError is caught and 'Expected method not found for retrieving system cpu usage' is logged; the provider becomes CpuUsageProvider.UNSUPPORTED and system CPU metrics report null.
Source
Thrown at agent-module/profiler-optional/profiler-optional-jdk8/src/main/java/com/navercorp/pinpoint/profiler/monitor/metric/cpu/ibm/DefaultCpuLoadMetric.java:57
final OperatingSystemMXBean operatingSystemMXBean = (com.ibm.lang.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
if (operatingSystemMXBean == null) {
throw new IllegalStateException("OperatingSystemMXBean not available");
}
CpuUsageProvider jvmCpuUsageProvider = new JvmCpuUsageProvider(operatingSystemMXBean);
try {
jvmCpuUsageProvider.getCpuUsage();
} catch (NoSuchMethodError e) {
logger.warn("Expected method not found for retrieving jvm cpu usage. Cause : {}", e.getMessage());
jvmCpuUsageProvider = CpuUsageProvider.UNSUPPORTED;
}
this.jvmCpuUsageProvider = jvmCpuUsageProvider;
CpuUsageProvider systemCpuUsageProvider = new SystemCpuUsageProvider(operatingSystemMXBean);
try {
systemCpuUsageProvider.getCpuUsage();
} catch (NoSuchMethodError e) {
logger.warn("Expected method not found for retrieving system cpu usage. Cause : {}", e.getMessage());
systemCpuUsageProvider = CpuUsageProvider.UNSUPPORTED;
}
this.systemCpuUsageProvider = systemCpuUsageProvider;
}
@Override
public CpuLoadMetricSnapshot getSnapshot() {
double jvmCpuUsage = jvmCpuUsageProvider.getCpuUsage();
double systemCpuUsage = systemCpuUsageProvider.getCpuUsage();
return new CpuLoadMetricSnapshot(jvmCpuUsage, systemCpuUsage);
}
@Override
public String toString() {
return "CpuLoadMetric for IBM Java 1.7+";
}
private static class JvmCpuUsageProvider implements CpuUsageProvider {View on GitHub (pinned to 744c3d3075)
Solutions
- Run on the intended IBM JRE or use the Oracle/HotSpot metric variant
- Upgrade the IBM JRE to a version exposing the system CPU load MXBean methods
- Treat the warning as informational — system CPU metric will simply be unsupported
- Confirm the correct profiler-optional module matches the runtime vendor
Example fix
// before new DefaultCpuLoadMetric(com.sun.management.OperatingSystemMXBean) // wrong bean on IBM JRE // after com.ibm.lang.management.OperatingSystemMXBean bean = (com.ibm.lang.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean(); new DefaultCpuLoadMetric(bean);
Defensive patterns
Strategy: fallback
Validate before calling
com.ibm.lang.management.OperatingSystemMXBean ibmBean = (bean instanceof com.ibm.lang.management.OperatingSystemMXBean) ? (com.ibm.lang.management.OperatingSystemMXBean) bean : null; if (ibmBean == null) skip system cpu provider setup;
Try / catch
try { systemProvider.getCpuUsage(); } catch (NoSuchMethodError e) { systemProvider = CpuUsageProvider.UNSUPPORTED; } Prevention
- Use the JVM-vendor-correct DefaultCpuLoadMetric implementation
- Upgrade IBM JRE if getSystemCpuLoad is missing
- Cast the platform MXBean to the vendor interface before probing
- Accept UNSUPPORTED degradation rather than disabling CPU metrics entirely
When it happens
Trigger: Constructing DefaultCpuLoadMetric on a JVM without the IBM-specific OperatingSystemMXBean.getSystemCpuLoad-style method — non-IBM JRE or an older IBM JRE lacking that API.
Common situations: HotSpot/OpenJDK runtime loading the IBM metric implementation; IBM JRE versions without getSystemCpuLoad; classpath shipping the wrong MXBean interface.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- Expected method not found for retrieving jvm cpu usage. Caus
- Expected method not found for retrieving jvm cpu usage. Caus
- OperatingSystemMXBean not available
- OperatingSystemMXBean not available
- Expected method not found for retrieving system cpu usage. C
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/2ac88156ab230f7f.
Report an issue: GitHub.