spring-cloud-stream-samples icon indicating copy to clipboard operation
spring-cloud-stream-samples copied to clipboard

'void org.springframework.cloud.stream.binder.kafka.streams.function.KafkaStreamsBindableProxyFactory.populateBindingTargetFactories

Open javaHelper opened this issue 4 years ago • 2 comments

I am getting below error when I tried to run the code for kafka-stream-table-join example.

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-06-01 19:28:31,181 ERROR main o.s.b.d.LoggingFailureAnalysisReporter:40 - 

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.cloud.stream.binder.kafka.streams.function.KafkaStreamsBindableProxyFactory.afterPropertiesSet(KafkaStreamsBindableProxyFactory.java:91)

The following method did not exist:

    'void org.springframework.cloud.stream.binder.kafka.streams.function.KafkaStreamsBindableProxyFactory.populateBindingTargetFactories(org.springframework.beans.factory.BeanFactory)'

The method's class, org.springframework.cloud.stream.binder.kafka.streams.function.KafkaStreamsBindableProxyFactory, is available from the following locations:

    jar:file:/C:/Users/pc/.m2/repository/org/springframework/cloud/spring-cloud-stream-binder-kafka-streams/3.1.3-SNAPSHOT/spring-cloud-stream-binder-kafka-streams-3.1.3-20210526.153544-59.jar!/org/springframework/cloud/stream/binder/kafka/streams/function/KafkaStreamsBindableProxyFactory.class

The class hierarchy was loaded from the following locations:

    org.springframework.cloud.stream.binder.kafka.streams.function.KafkaStreamsBindableProxyFactory: file:/C:/Users/pc/.m2/repository/org/springframework/cloud/spring-cloud-stream-binder-kafka-streams/3.1.3-SNAPSHOT/spring-cloud-stream-binder-kafka-streams-3.1.3-20210526.153544-59.jar
    org.springframework.cloud.stream.binding.AbstractBindableProxyFactory: file:/C:/Users/pc/.m2/repository/org/springframework/cloud/spring-cloud-stream/3.1.2/spring-cloud-stream-3.1.2.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.cloud.stream.binder.kafka.streams.function.KafkaStreamsBindableProxyFactory


Process finished with exit code 1

javaHelper avatar Jun 01 '21 14:06 javaHelper

@javaHelper Could you tell more about the context on how you got that error? How can we run it on our end to reproduce the issue?

sobychacko avatar Jun 16 '21 14:06 sobychacko

I am experiencing the same issue. In my case I have stitched together a maven POM with exclusions etc to get access to the REPLACE THREAD functionality in kafka streams supported in version 2.8. Using the following parent definition

<parent>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-parent</artifactId>
  <version>2.4.2</version>
  <relativePath/> <!-- lookup parent from repository -->
</parent>

with the following dependency

<dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-stream-binder-kafka-streams</artifactId>			
   <version>3.1.1</version>
</dependency>

you might be able to trigger this exception.

razilevin avatar Aug 05 '21 17:08 razilevin