spring-cloud / spring-cloud-stream

Framework for building Event-Driven Microservices
http://cloud.spring.io/spring-cloud-stream
Apache License 2.0
1k stars 610 forks source link

alltopicnames is not found #2785

Closed nabeelAtAlef closed 1 year ago

nabeelAtAlef commented 1 year ago

trying to reopen the closed ticket - https://github.com/spring-cloud/spring-cloud-stream/issues/2784

I tried with the suggested version - Spring Cloud 2022.x.x with Spring Boot 3.0.x Still the same issue.

Caused by: java.lang.NoSuchMethodError: 'org.apache.kafka.common.KafkaFuture org.apache.kafka.clients.admin.DescribeTopicsResult.allTopicNames()' at org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner.lambda$retrieveTopicDescriptions$1(KafkaTopicProvisioner.java:275) ~[spring-cloud-stream-binder-kafka-core-4.0.3.jar!/:4.0.3] at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:329) ~[spring-retry-1.3.1.jar!/:na] at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:209) ~[spring-retry-1.3.1.jar!/:na] at org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner.retrieveTopicDescriptions(KafkaTopicProvisioner.java:267) ~[spring-cloud-stream-binder-kafka-core-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner.getPartitionsForTopic(KafkaTopicProvisioner.java:258) ~[spring-cloud-stream-binder-kafka-core-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner.provisionProducerDestination(KafkaTopicProvisioner.java:194) ~[spring-cloud-stream-binder-kafka-core-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.binder.kafka.provisioning.KafkaTopicProvisioner.provisionProducerDestination(KafkaTopicProvisioner.java:91) ~[spring-cloud-stream-binder-kafka-core-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindProducer(AbstractMessageChannelBinder.java:286) ~[spring-cloud-stream-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.doBindProducer(AbstractMessageChannelBinder.java:102) ~[spring-cloud-stream-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.binder.AbstractBinder.bindProducer(AbstractBinder.java:153) ~[spring-cloud-stream-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.binding.BindingService.doBindProducer(BindingService.java:345) ~[spring-cloud-stream-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.binding.BindingService.bindProducer(BindingService.java:294) ~[spring-cloud-stream-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.function.StreamBridge.resolveDestination(StreamBridge.java:257) ~[spring-cloud-stream-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.function.StreamBridge.send(StreamBridge.java:161) ~[spring-cloud-stream-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.function.StreamBridge.send(StreamBridge.java:147) ~[spring-cloud-stream-4.0.3.jar!/:4.0.3] at org.springframework.cloud.stream.function.StreamBridge.send(StreamBridge.java:142) ~[spring-cloud-stream-4.0.3.jar!/:4.0.3] at com.alefeducation.contentrepositoryservice.event.Publisher.publish(Publisher.kt:17) ~[classes!/:0.0.1-SNAPSHOT] at com.alefeducation.contentrepositoryservice.services.RepositoryService.createRepository(RepositoryService.kt:21) ~[classes!/:0.0.1-SNAPSHOT] at com.alefeducation.contentrepositoryservice.controller.RepositoryController.createRepository(RepositoryController.kt:22) ~[classes!/:0.0.1-SNAPSHOT] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]

Also spring boot compatibility suggests that cloud 2022.x.x should work fine with boot 3.1.x - https://spring.io/projects/spring-cloud.

olegz commented 1 year ago

Please post your POM. You clearly have some dependency managed manually that is not inline with what's supported, but without seeing your POM it's impossible to say

nabeelAtAlef commented 1 year ago

Hi @olegz , here's my dependencies -

`

compileClasspath - Compile classpath for null/main. +--- org.springframework.boot:spring-boot-starter-actuator -> 3.0.9 | +--- org.springframework.boot:spring-boot-starter:3.0.9 | | +--- org.springframework.boot:spring-boot:3.0.9 | | | +--- org.springframework:spring-core:6.0.11 | | | | --- org.springframework:spring-jcl:6.0.11 | | | --- org.springframework:spring-context:6.0.11 | | | +--- org.springframework:spring-aop:6.0.11 | | | | +--- org.springframework:spring-beans:6.0.11 | | | | | --- org.springframework:spring-core:6.0.11 () | | | | --- org.springframework:spring-core:6.0.11 () | | | +--- org.springframework:spring-beans:6.0.11 () | | | +--- org.springframework:spring-core:6.0.11 () | | | --- org.springframework:spring-expression:6.0.11 | | | --- org.springframework:spring-core:6.0.11 () | | +--- org.springframework.boot:spring-boot-autoconfigure:3.0.9 | | | --- org.springframework.boot:spring-boot:3.0.9 () | | +--- org.springframework.boot:spring-boot-starter-logging:3.0.9 | | | +--- ch.qos.logback:logback-classic:1.4.8 | | | | +--- ch.qos.logback:logback-core:1.4.8 | | | | --- org.slf4j:slf4j-api:2.0.7 | | | +--- org.apache.logging.log4j:log4j-to-slf4j:2.19.0 | | | | +--- org.slf4j:slf4j-api:1.7.36 -> 2.0.7 | | | | --- org.apache.logging.log4j:log4j-api:2.19.0 | | | --- org.slf4j:jul-to-slf4j:2.0.7 | | | --- org.slf4j:slf4j-api:2.0.7 | | +--- jakarta.annotation:jakarta.annotation-api:2.1.1 | | +--- org.springframework:spring-core:6.0.11 () | | --- org.yaml:snakeyaml:1.33 | +--- org.springframework.boot:spring-boot-actuator-autoconfigure:3.0.9 | | +--- org.springframework.boot:spring-boot-actuator:3.0.9 | | | --- org.springframework.boot:spring-boot:3.0.9 () | | +--- org.springframework.boot:spring-boot:3.0.9 () | | --- org.springframework.boot:spring-boot-autoconfigure:3.0.9 () | +--- io.micrometer:micrometer-observation:1.10.9 | | --- io.micrometer:micrometer-commons:1.10.9 | --- io.micrometer:micrometer-core:1.10.9 | +--- io.micrometer:micrometer-commons:1.10.9 | --- io.micrometer:micrometer-observation:1.10.9 () +--- org.springframework.boot:spring-boot-starter-data-mongodb -> 3.0.9 | +--- org.springframework.boot:spring-boot-starter:3.0.9 () | +--- org.mongodb:mongodb-driver-sync:4.8.2 -> 4.10.2 | | +--- org.mongodb:bson:4.10.2 | | --- org.mongodb:mongodb-driver-core:4.10.2 | | --- org.mongodb:bson:4.10.2 | --- org.springframework.data:spring-data-mongodb:4.0.8 | +--- org.springframework:spring-tx:6.0.11 | | +--- org.springframework:spring-beans:6.0.11 () | | --- org.springframework:spring-core:6.0.11 () | +--- org.springframework:spring-context:6.0.11 () | +--- org.springframework:spring-beans:6.0.11 () | +--- org.springframework:spring-core:6.0.11 () | +--- org.springframework:spring-expression:6.0.11 () | +--- org.springframework.data:spring-data-commons:3.0.8 | | +--- org.springframework:spring-core:6.0.11 () | | +--- org.springframework:spring-beans:6.0.11 () | | --- org.slf4j:slf4j-api:2.0.2 -> 2.0.7 | +--- org.mongodb:mongodb-driver-core:4.8.2 -> 4.10.2 () | --- org.slf4j:slf4j-api:2.0.2 -> 2.0.7 +--- org.springframework.boot:spring-boot-starter-web -> 3.0.9 | +--- org.springframework.boot:spring-boot-starter:3.0.9 () | +--- org.springframework.boot:spring-boot-starter-json:3.0.9 | | +--- org.springframework.boot:spring-boot-starter:3.0.9 () | | +--- org.springframework:spring-web:6.0.11 | | | +--- org.springframework:spring-beans:6.0.11 () | | | +--- org.springframework:spring-core:6.0.11 () | | | --- io.micrometer:micrometer-observation:1.10.9 () | | +--- com.fasterxml.jackson.core:jackson-databind:2.14.3 | | | +--- com.fasterxml.jackson.core:jackson-annotations:2.14.3 | | | | --- com.fasterxml.jackson:jackson-bom:2.14.3 | | | | +--- com.fasterxml.jackson.core:jackson-annotations:2.14.3 (c) | | | | +--- com.fasterxml.jackson.core:jackson-databind:2.14.3 (c) | | | | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.14.3 (c) | | | | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.3 (c) | | | | +--- com.fasterxml.jackson.module:jackson-module-kotlin:2.14.3 (c) | | | | +--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.14.3 (c) | | | | --- com.fasterxml.jackson.core:jackson-core:2.14.3 (c) | | | +--- com.fasterxml.jackson.core:jackson-core:2.14.3 | | | | --- com.fasterxml.jackson:jackson-bom:2.14.3 () | | | --- com.fasterxml.jackson:jackson-bom:2.14.3 () | | +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.14.3 | | | +--- com.fasterxml.jackson.core:jackson-core:2.14.3 () | | | +--- com.fasterxml.jackson.core:jackson-databind:2.14.3 () | | | --- com.fasterxml.jackson:jackson-bom:2.14.3 () | | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.3 | | | +--- com.fasterxml.jackson.core:jackson-annotations:2.14.3 () | | | +--- com.fasterxml.jackson.core:jackson-core:2.14.3 () | | | +--- com.fasterxml.jackson.core:jackson-databind:2.14.3 () | | | --- com.fasterxml.jackson:jackson-bom:2.14.3 () | | --- com.fasterxml.jackson.module:jackson-module-parameter-names:2.14.3 | | +--- com.fasterxml.jackson.core:jackson-core:2.14.3 () | | +--- com.fasterxml.jackson.core:jackson-databind:2.14.3 () | | --- com.fasterxml.jackson:jackson-bom:2.14.3 () | +--- org.springframework.boot:spring-boot-starter-tomcat:3.0.9 | | +--- jakarta.annotation:jakarta.annotation-api:2.1.1 | | +--- org.apache.tomcat.embed:tomcat-embed-core:10.1.11 | | +--- org.apache.tomcat.embed:tomcat-embed-el:10.1.11 | | --- org.apache.tomcat.embed:tomcat-embed-websocket:10.1.11 | | --- org.apache.tomcat.embed:tomcat-embed-core:10.1.11 | +--- org.springframework:spring-web:6.0.11 () | --- org.springframework:spring-webmvc:6.0.11 | +--- org.springframework:spring-aop:6.0.11 () | +--- org.springframework:spring-beans:6.0.11 () | +--- org.springframework:spring-context:6.0.11 () | +--- org.springframework:spring-core:6.0.11 () | +--- org.springframework:spring-expression:6.0.11 () | --- org.springframework:spring-web:6.0.11 () +--- org.springframework.cloud:spring-cloud-stream -> 4.0.4 | +--- org.springframework.boot:spring-boot-starter-validation:3.0.9 | | +--- org.springframework.boot:spring-boot-starter:3.0.9 () | | +--- org.apache.tomcat.embed:tomcat-embed-el:10.1.11 | | --- org.hibernate.validator:hibernate-validator:8.0.1.Final | | +--- jakarta.validation:jakarta.validation-api:3.0.2 | | +--- org.jboss.logging:jboss-logging:3.4.3.Final -> 3.5.3.Final | | --- com.fasterxml:classmate:1.5.1 | +--- org.springframework:spring-messaging:6.0.11 | | +--- org.springframework:spring-beans:6.0.11 () | | --- org.springframework:spring-core:6.0.11 () | +--- org.springframework.integration:spring-integration-core:6.0.6 | | +--- org.springframework:spring-aop:6.0.10 -> 6.0.11 () | | +--- org.springframework:spring-context:6.0.10 -> 6.0.11 () | | +--- org.springframework:spring-messaging:6.0.10 -> 6.0.11 () | | +--- org.springframework:spring-tx:6.0.10 -> 6.0.11 () | | +--- org.springframework.retry:spring-retry:2.0.2 | | +--- io.projectreactor:reactor-core:3.5.7 -> 3.5.8 | | | --- org.reactivestreams:reactive-streams:1.0.4 | | --- io.micrometer:micrometer-observation:1.10.8 -> 1.10.9 () | +--- org.springframework.integration:spring-integration-jmx:6.0.6 | | --- org.springframework.integration:spring-integration-core:6.0.6 () | +--- org.springframework.retry:spring-retry:2.0.2 | +--- org.springframework.cloud:spring-cloud-function-context:4.0.5 | | +--- net.jodah:typetools:0.6.2 | | +--- org.springframework.boot:spring-boot-autoconfigure:3.0.9 () | | +--- org.springframework.cloud:spring-cloud-function-core:4.0.5 | | | +--- io.projectreactor:reactor-core:3.5.8 () | | | --- org.springframework:spring-core:6.0.11 () | | +--- org.springframework:spring-messaging:6.0.11 () | | --- com.fasterxml.jackson.core:jackson-databind:2.14.3 () | --- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.22 -> 1.8.22 | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 | | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 | | --- org.jetbrains:annotations:13.0 | --- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22 | --- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 () +--- org.springframework.cloud:spring-cloud-stream-binder-kafka -> 4.0.4 | +--- org.springframework.cloud:spring-cloud-stream-binder-kafka-core:4.0.4 | | +--- org.springframework.cloud:spring-cloud-stream:4.0.4 () | | --- org.springframework.integration:spring-integration-kafka:6.0.6 | | +--- org.springframework.integration:spring-integration-core:6.0.6 () | | --- org.springframework.kafka:spring-kafka:3.0.8 -> 3.0.9 | | +--- org.springframework:spring-context:6.0.11 () | | +--- org.springframework:spring-messaging:6.0.11 () | | +--- org.springframework:spring-tx:6.0.11 () | | +--- org.springframework.retry:spring-retry:2.0.2 | | +--- org.apache.kafka:kafka-clients:3.3.2 | | --- io.micrometer:micrometer-observation:1.10.9 () | +--- org.springframework.cloud:spring-cloud-stream:4.0.4 () | --- org.springframework.kafka:spring-kafka:3.0.9 () +--- org.springframework.kafka:spring-kafka -> 3.0.9 () +--- com.fasterxml.jackson.module:jackson-module-kotlin -> 2.14.3 | +--- com.fasterxml.jackson.core:jackson-databind:2.14.3 () | +--- com.fasterxml.jackson.core:jackson-annotations:2.14.3 () | +--- org.jetbrains.kotlin:kotlin-reflect:1.5.32 -> 1.8.22 | | --- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 () | --- com.fasterxml.jackson:jackson-bom:2.14.3 () +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22 () +--- org.jetbrains.kotlin:kotlin-reflect:1.8.22 () +--- com.auth0:java-jwt:4.4.0 +--- io.mongock:mongock-springboot -> 5.2.4 | --- io.mongock:mongock-springboot-base:5.2.4 | +--- io.mongock:mongock-spring-base:5.2.4 | | +--- io.mongock:mongock-runner-core:5.2.4 | | | +--- io.mongock:mongock-api:5.2.4 | | | | +--- io.mongock:mongock-utils:5.2.4 | | | | | --- org.slf4j:slf4j-api:1.7.25 -> 2.0.7 | | | | --- org.slf4j:slf4j-api:1.7.25 -> 2.0.7 | | | +--- io.mongock:mongock-driver-api:5.2.4 | | | | +--- io.mongock:mongock-api:5.2.4 () | | | | +--- io.mongock:mongock-utils:5.2.4 () | | | | +--- org.javassist:javassist:3.28.0-GA | | | | +--- org.objenesis:objenesis:3.2 | | | | +--- com.google.guava:guava:30.1.1-jre | | | | | +--- com.google.guava:failureaccess:1.0.1 | | | | | +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava | | | | | +--- com.google.code.findbugs:jsr305:3.0.2 | | | | | +--- org.checkerframework:checker-qual:3.8.0 | | | | | +--- com.google.errorprone:error_prone_annotations:2.5.1 | | | | | --- com.google.j2objc:j2objc-annotations:1.3 | | | | --- javax.inject:javax.inject:1 | | | +--- io.mongock:mongock-utils:5.2.4 () | | | +--- org.slf4j:slf4j-api:1.7.25 -> 2.0.7 | | | +--- org.reflections:reflections:0.10.1 | | | | +--- org.javassist:javassist:3.28.0-GA | | | | +--- com.google.code.findbugs:jsr305:3.0.2 | | | | --- org.slf4j:slf4j-api:1.7.32 -> 2.0.7 | | | +--- org.apache.maven:maven-artifact:3.6.1 | | | | +--- org.codehaus.plexus:plexus-utils:3.2.0 | | | | --- org.apache.commons:commons-lang3:3.8.1 -> 3.12.0 | | | --- com.google.code.gson:gson:2.8.9 -> 2.9.1 | | +--- io.mongock:mongock-api:5.2.4 () | | --- io.mongock:mongock-utils:5.2.4 () | +--- io.mongock:mongock-utils:5.2.4 () | +--- org.springframework.boot:spring-boot-autoconfigure:[2.0.0, 3.0.0) -> 3.0.9 () | --- org.springframework.boot:spring-boot-configuration-processor:[2.0.0, 3.0.0) -> 3.0.9 +--- io.mongock:mongodb-springdata-v3-driver -> 5.2.4 | +--- io.mongock:mongock-driver-core:5.2.4 | | +--- io.mongock:mongock-driver-api:5.2.4 () | | +--- io.mongock:mongock-api:5.2.4 () | | +--- io.mongock:mongock-utils:5.2.4 () | | --- org.slf4j:slf4j-api:1.7.25 -> 2.0.7 | +--- io.mongock:mongock-api:5.2.4 () | +--- io.mongock:mongodb-sync-v4-driver:5.2.4 | | +--- io.mongock:mongock-driver-core:5.2.4 () | | --- io.mongock:mongock-api:5.2.4 () | --- org.springframework.boot:spring-boot-autoconfigure:[2.0.0, 3.0.0) -> 3.0.9 () +--- org.mongodb:mongodb-driver-sync:4.10.2 () +--- org.mongodb:mongodb-driver-core:4.10.2 (*) +--- org.mongodb:bson:4.10.2 `

sobychacko commented 1 year ago

Could you set up a small sample application where it is failing with the minimum setup? We would like to see it reproduced.

nabeelAtAlef commented 1 year ago

We can close this, a transitive dependency was causing version conflict. Clearing gradle cache and fixing the version worked.

Thanks