Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 'java.lang.NoSuchFieldError: logger' after updating kafka binder version from 2.2.1 to 3.1.6 #3082

Open
GajananKulk opened this issue Feb 13, 2025 · 1 comment

Comments

@GajananKulk
Copy link

I've updated the Kafka binder version from 2.2.1.RELEASE to 3.1.6 ('org.springframework.cloud:spring-cloud-stream-binder-kafka:3.1.6') in the producer service. The consumer service is using Kafka binder version 2.2.1.RELEASE. When the producer is producing an event to the consumer, it gives the error below on the consumer side.

org.springframework.kafka.listener.ListenerExecutionFailedException: Listener failed; nested exception is org.springframework.messaging.MessagingException: Failed to handle Message; nested exception is org.springframework.messaging.MessagingException: logger; nested exception is java.lang.NoSuchFieldError: logger, failedMessage=ErrorMessage [payload=org.springframework.messaging.MessagingException: logger; nested exception is java.lang.NoSuchFieldError: logger,

Caused by: java.lang.NoSuchFieldError: logger
  at org.springframework.cloud.stream.binder.kafka.BinderHeaderMapper.lambda$toHeaders$1(BinderHeaderMapper.java:265)

I'm updating app spring boot version from 2.3.13 to 2.7.18.

Please suggest which Binder Kafka version I can use in the producer that is backward compatible with the consumer version 2.2.1.RELEASE.

@sobychacko
Copy link
Contributor

@GajananKulk These versions are out of any support for a long time. See the support details here: https://spring.io/projects/spring-cloud-stream#support

We suggest you update your application to a supported version, and if the problem still persists, please report back here.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants