spring-cloud / spring-cloud-stream-binder-aws-kinesis

Spring Cloud Stream binder for AWS Kinesis
Apache License 2.0
99 stars 97 forks source link

spring-integration-core 5.5.18 not compitible with stream-binder-kinesis 4.0.0 #211

Closed Lucas1983 closed 1 year ago

Lucas1983 commented 1 year ago

In what version(s) of Spring Cloud Stream Binder for AWS Kinesis are you seeing this issue?

For example:

4.0.0

Describe the bug

spring-integration-core 5.5.18 not compitible with stream-binder-kinesis 4.0.0

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-10-12 09:30:28.824 ERROR 26763 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
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.kinesis.KinesisMessageChannelBinder.createConsumerEndpoint(KinesisMessageChannelBinder.java:341)

The following method did not exist:

    'void org.springframework.integration.endpoint.MessageProducerSupport.registerObservationRegistry(io.micrometer.observation.ObservationRegistry)'

The calling method's class, org.springframework.cloud.stream.binder.kinesis.KinesisMessageChannelBinder, was loaded from the following location:

    jar:file:/Users/.gradle/caches/modules-2/files-2.1/org.springframework.cloud/spring-cloud-stream-binder-kinesis/4.0.0/94cac6edf68158c7fe8230e7ada00276d7ee00c0/spring-cloud-stream-binder-kinesis-4.0.0.jar!/org/springframework/cloud/stream/binder/kinesis/KinesisMessageChannelBinder.class

The called method's class, org.springframework.integration.endpoint.MessageProducerSupport, is available from the following locations:

    jar:file:/Users/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-core/5.5.18/2e177e29c2f31dd0ace216e0d9b8c4ce439c7429/spring-integration-core-5.5.18.jar!/org/springframework/integration/endpoint/MessageProducerSupport.class

The called method's class hierarchy was loaded from the following locations:

    org.springframework.integration.endpoint.MessageProducerSupport: file:/Users/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-core/5.5.18/2e177e29c2f31dd0ace216e0d9b8c4ce439c7429/spring-integration-core-5.5.18.jar
    org.springframework.integration.endpoint.AbstractEndpoint: file:/Users/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-core/5.5.18/2e177e29c2f31dd0ace216e0d9b8c4ce439c7429/spring-integration-core-5.5.18.jar
    org.springframework.integration.context.IntegrationObjectSupport: file:/Users/.gradle/caches/modules-2/files-2.1/org.springframework.integration/spring-integration-core/5.5.18/2e177e29c2f31dd0ace216e0d9b8c4ce439c7429/spring-integration-core-5.5.18.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.cloud.stream.binder.kinesis.KinesisMessageChannelBinder and org.springframework.integration.endpoint.MessageProducerSupport

Disconnected from the target VM, address: '127.0.0.1:64888', transport: 'socket'

Process finished with exit code 1

To Reproduce

Steps to reproduce the behavior.

Expected behavior

No error happens.

Sample

Gradle 7.3.3 Spring Boot 2.7.14

dependencies {
    compileOnly 'org.projectlombok:lombok'
    compileOnly("org.springframework.boot:spring-boot-devtools")

    annotationProcessor 'org.projectlombok:lombok'
    annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"

    runtimeOnly 'org.postgresql:postgresql'
    implementation 'com.github.ben-manes.caffeine:caffeine:3.1.2'

    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-aop'
    implementation 'org.springframework.boot:spring-boot-starter-mail'
    implementation 'org.springframework.boot:spring-boot-starter-cache'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
    implementation 'org.springframework.boot:spring-boot-starter-validation'

    implementation 'org.springframework.boot:spring-boot-starter-security'
    implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'

    implementation 'org.springframework.cloud:spring-cloud-starter'
    implementation 'org.springframework.cloud:spring-cloud-stream-binder-kinesis:4.0.0'

    implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'

    implementation 'org.springframework.retry:spring-retry:1.3.4'
    implementation 'org.springframework:spring-jms'

    implementation 'org.flywaydb:flyway-core:9.21.0'
    implementation 'io.micrometer:micrometer-core:1.10.3'
    implementation 'io.micrometer:micrometer-registry-jmx:1.10.3'
    implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2'

    implementation 'software.amazon.awssdk:sso'
    implementation "software.amazon.awssdk:cognitoidentityprovider"
    implementation "software.amazon.awssdk:s3"
    implementation "software.amazon.awssdk:sqs"
    implementation "software.amazon.awssdk:apache-client"
    implementation "software.amazon.awssdk:dynamodb"
    implementation "software.amazon.awssdk:autoscaling"
    implementation "software.amazon.awssdk:applicationautoscaling"

    implementation "software.amazon.awssdk:dynamodb-enhanced"
    implementation "software.amazon.kinesis:amazon-kinesis-client:2.5.0"

    implementation 'com.amazonaws:amazon-sqs-java-messaging-lib:2.0.3'

    implementation 'io.vavr:vavr:0.10.4'
    implementation 'org.apache.commons:commons-lang3:3.12.0'
    implementation 'com.google.code.findbugs:jsr305:3.0.2'
    implementation 'org.apache.commons:commons-collections4:4.4'
    implementation 'com.google.guava:guava:31.1-jre'
    implementation "org.apache.commons:commons-csv:1.9.0"
    implementation 'org.apache.commons:commons-text:1.10.0'
    implementation 'commons-io:commons-io:2.11.0'

    implementation 'org.springdoc:springdoc-openapi-ui:1.6.12'
    implementation 'org.springdoc:springdoc-openapi-security:1.6.12'
    implementation 'org.springdoc:springdoc-openapi-data-rest:1.6.12'

    implementation group: 'com.ibm.icu', name: 'icu4j', version: '71.1'

    implementation 'io.hypersistence:hypersistence-utils-hibernate-55:3.5.0'

    testImplementation 'com.google.truth:truth:1.1.3'
    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
    testImplementation 'com.github.javafaker:javafaker:1.0.2'
    testImplementation 'org.yaml:snakeyaml:1.33'

    implementation 'net.logstash.logback:logstash-logback-encoder:7.2'
}
artembilan commented 1 year ago

This project starting with version 4.0 is based on Spring Boot 3.0.x and there no where was a claim that is going to be compatible with Spring Boot 2.7.x. Please, consider to upgrade not only Kinesis binder dependency, but the whole portfolio.