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

DefaultErrorHandler not exists #1200

Closed
dulm opened this issue Feb 16, 2022 · 4 comments
Closed

DefaultErrorHandler not exists #1200

dulm opened this issue Feb 16, 2022 · 4 comments

Comments

@dulm
Copy link

dulm commented Feb 16, 2022

error:

org.springframework.context.ApplicationContextException: Failed to start bean 'inputBindingLifecycle'; nested exception is java.lang.NoClassDefFoundError: org/springframework/kafka/listener/DefaultErrorHandler

because spring-integration-kafka has import org.springframework.kafka:spring-kafka:2.6.6 override the 2.8.0

org.springframework.kafka:spring-kafka:2.6.6
\--- org.springframework.integration:spring-integration-kafka:5.4.4
     \--- org.springframework.cloud:spring-cloud-stream-binder-kafka-core:3.2.1 (requested org.springframework.integration:spring-integration-kafka:5.5.5)
          \--- org.springframework.cloud:spring-cloud-stream-binder-kafka:3.2.1
               \--- compileClasspath

org.springframework.kafka:spring-kafka:2.8.0 -> 2.6.6
\--- org.springframework.cloud:spring-cloud-stream-binder-kafka:3.2.1
     \--- compileClasspath

fix by manullly require 2.8.0

@sobychacko
Copy link
Contributor

@dulm What is your boot version? Boot overrides the Spring for Apache Kafka dependency regardless of what version the binder used at compile time. These are the corresponding versions that binder 3.2.1 uses. I don't see how you use Spring Kafka 2.6. One way that could happen is if you are using an older version of Boot. Binder 3.2.x is compatible with Boot 2.6+. Please make sure that you are at that level of Boot and see if that resolves your issue.

@sobychacko
Copy link
Contributor

Closing the issue due to no activity. Feel free to re-open if you are still facing issues.

@dulm
Copy link
Author

dulm commented Apr 27, 2022

my versions:

springbootVersion = '2.4.3'
springCloudStreamVersion = '3.2.1'

@garyrussell
Copy link
Contributor

The DefaultErrorHandler was introduced in spring-kafka 2.8, which is used by Boot 2.6; you can't use it with Boot 2.4 (which is no longer supported). Spring Cloud Stream 3.2.x also requires Boot 2.6. Currently 3.2.2 and 2.6.7 respectively.

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

No branches or pull requests

3 participants