Duansg opened a new pull request, #4377: URL: https://github.com/apache/hertzbeat/pull/4377
### Problem The Windows native collector still fails to start after #4375: NotCompliantMBeanException: com.sun.management.ThreadMXBean: Method getThreadInfo has parameter or return type that cannot be translated into an open type Linux and macOS are fine — same commit, same build args. ### Cause #4375 handled the platform MXBean value types with `--enable-monitoring=jmxclient`. That option does not take effect on Windows (oracle/graal#9563; still experimental per the docs), so `ThreadInfo` and friends are never registered there. String comparison of the CI Windows binary against a local macOS build of commit 3089f72580: | marker | Windows (CI) | macOS | |---|---|---| | `JMXConnectorFactory` | 0 | 8 | | `getLockedMonitors` | 0 | 1 | | `javax.management.remote` | 9 | 54 | ### Fix Register the value types explicitly in `reachability-metadata.json` (`ThreadInfo`, `LockInfo`, `MonitorInfo`, `StackTraceElement`, `MemoryUsage`, `GcInfo`) and remove `--enable-monitoring=jmxclient`. Metadata files are read by native-image on every platform, so this does not depend on the broken feature path. ### Verification macos-arm64, built from this branch: - `JMXConnectorFactory` absent (option really gone) - `getLockedMonitors` present (metadata really applied) - `Started Collector in 0.105 seconds`, 37 collect strategies registered, process stays up -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
