Zhou, It appears that this class was moved most recently in this PR: https://github.com/apache/kafka/pull/11970 Checking the build on trunk, the class does appear to be in the server-common JAR:
$ jar -tf server-common/build/libs/kafka-server-common-3.5.0-SNAPSHOT.jar | grep Yammer org/apache/kafka/server/metrics/KafkaYammerMetrics.class KafkaYammerMetrics does not appear to be part of the documented API in the most recent release https://kafka.apache.org/34/javadoc/index.html or in prior releases. I believe this means that you are depending on internal classes of Kafka, and are subject to breakages like this when updating, even in patch releases. This is not recommended, and you should look into a long-term replacement for the KafkaYammerMetrics class. I hope this helps, Greg Harris On Wed, Mar 22, 2023 at 6:27 AM Rui <wireles...@gmail.com> wrote: > Hi Kafka group: > recently I upgrade these libs to: > kafka-clients 3.4.0 > kafka_2.13:3.4.0 > spring-kafka-test:3.0.4 > > but I got a Class Not found issue:(stacktrace) > > Java.lang.NoClassDefFoundError: > org/apache/kafka/server/metrics/KafkaYammerMetrics > KafkaServer > org.springframework.kafka.test.EmbeddedKafkaBroker.. > > It seems this file was removed from kafka_2.13 lib after checking the > github, > > https://github.com/apache/kafka/blob/dd62ef2eda571576a222d757beabcd7690dd8c16/core/src/main/java/kafka/metrics/KafkaYammerMetrics.java > > So my question is which lib I should include as the dependency? > > thanks > Zhou Rui >