-
Bug
-
Resolution: Fixed
-
Critical
-
Jenkins version: 2.479.2
Monitoring plugin version: 2.4.0
aws-java-sdk plugin version: 1.12.772-474.v7f79a_2046a_fb_
Java version: OpenJDK 17
The monitoring plugin fails to access AWS CloudWatch classes with the following error:
java.lang.NoClassDefFoundError: com/amazonaws/services/cloudwatch/AmazonCloudWatchClientBuilder
This occurs when JavaMelody attempts to publish metrics to CloudWatch (when -Djavamelody.cloudwatch-namespace is configured).
The issue appears to be related to:
- Jenkins core change in 2.479.2 (
JENKINS-74814) which modified class loading behavior with RETAIN_CLASS_REFERENCE - The CloudWatch classes are present in aws-java-sdk plugin (1.12.772) but the monitoring plugin can't access them despite having aws-cloudwatch-library dependency in pom.xml
Steps to Reproduce:
- Install monitoring plugin 2.4.0
- Install aws-java-sdk plugin
- Configure JavaMelody with -Djavamelody.cloudwatch-namespace=your-namespace
- Access Jenkins monitoring page
Current Behavior:
ClassNotFoundException when accessing monitoring page
CloudWatch metrics are not published
Expected Behavior:
Monitoring plugin should successfully access AWS CloudWatch classes
Metrics should be published to CloudWatch
- links to
I also have current problem. This issue not Reproduce in 1.99 version.