Skip to content

[BUG] KafkaPropertiesBeanPostProcessor using a removed method in springboot 3.4 #43142

Closed

Description

@shalabi

Describe the bug
When starting up the server with spring boot 3.4:

api-server-1  | ***************************
api-server-1  | APPLICATION FAILED TO START
api-server-1  | ***************************
api-server-1  | 
api-server-1  | Description:
api-server-1  | 
api-server-1  | An attempt was made to call a method that does not exist. The attempt was made from the following location:
api-server-1  | 
api-server-1  |     com.azure.spring.cloud.autoconfigure.implementation.kafka.KafkaPropertiesBeanPostProcessor.getMergedProducerProperties(KafkaPropertiesBeanPostProcessor.java:23)
api-server-1  | 
api-server-1  | The following method did not exist:
api-server-1  | 
api-server-1  |     'java.util.Map org.springframework.boot.autoconfigure.kafka.KafkaProperties.buildProducerProperties()'
api-server-1  | 
api-server-1  | The calling method's class, com.azure.spring.cloud.autoconfigure.implementation.kafka.KafkaPropertiesBeanPostProcessor, was loaded from the following location:
api-server-1  | 
api-server-1  |     jar:nested:/app/app.jar/!BOOT-INF/lib/spring-cloud-azure-autoconfigure-5.18.0.jar!/com/azure/spring/cloud/autoconfigure/implementation/kafka/KafkaPropertiesBeanPostProcessor.class
api-server-1  | 
api-server-1  | The called method's class, org.springframework.boot.autoconfigure.kafka.KafkaProperties, is available from the following locations:
api-server-1  | 
api-server-1  |     jar:nested:/app/app.jar/!BOOT-INF/lib/spring-boot-autoconfigure-3.4.0.jar!/org/springframework/boot/autoconfigure/kafka/KafkaProperties.class
api-server-1  | 
api-server-1  | The called method's class hierarchy was loaded from the following locations:
api-server-1  | 
api-server-1  |     org.springframework.boot.autoconfigure.kafka.KafkaProperties: jar:nested:/app/app.jar/!BOOT-INF/lib/spring-boot-autoconfigure-3.4.0.jar!/
api-server-1  | 
api-server-1  | 
api-server-1  | Action:
api-server-1  | 
api-server-1  | Correct the classpath of your application so that it contains compatible versions of the classes com.azure.spring.cloud.autoconfigure.implementation.kafka.KafkaPropertiesBeanPostProcessor and org.springframework.boot.autoconfigure.kafka.KafkaProperties
api-server-1  | 
api-server-1 exited with code 1

Exception or Stack Trace
Problem is now has an argument and no zero argument method

class KafkaPropertiesBeanPostProcessor extends AbstractKafkaPropertiesBeanPostProcessor<KafkaProperties> {

 @SuppressWarnings("removal")
    @Override
    protected Map<String, Object> getMergedProducerProperties(KafkaProperties properties) {
        return properties.buildProducerProperties();
    }
}

To Reproduce
Steps to reproduce the behavior:

use spring 3.4.0

Code Snippet
Add the code snippet that causes the issue.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: [e.g. iOS]
  • IDE: [e.g. IntelliJ]
  • Library/Libraries: [e.g. com.azure:azure-core:1.16.0 (groupId:artifactId:version)]
  • Java version: [e.g. 8]
  • App Server/Environment: [e.g. Tomcat, WildFly, Azure Function, Apache Spark, Databricks, IDE plugin or anything special]
  • Frameworks: [e.g. Spring Boot, Micronaut, Quarkus, etc]

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

  • verbose dependency tree (mvn dependency:tree -Dverbose)
  • exception message, full stack trace, and any available logs

Additional context
Add any other context about the problem here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

Activity

  1. added
    azure-springAll azure-spring related issues
    ClientThis issue points to a problem in the data-plane of the library.
    customer-reportedIssues that are reported by GitHub users external to the Azure organization.
    needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team
    questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
    on Nov 30, 2024
  2. github-actions commented on Nov 30, 2024

    @github-actions
    Contributor

    Thank you for your feedback. Tagging and routing to the team member best able to assist.

  3. saragluna commented on Dec 1, 2024

    @saragluna
    Member

    Thanks for reaching out, we have fixed this issue, and please wait for our next release. Moary Chen (@moarychan) fyi.

  4. added this to the 2024-12 milestone on Dec 1, 2024
  5. moarychan commented on Dec 4, 2024

    @moarychan
    Member

    Fixed in #43098

  6. locked and limited conversation to collaborators on Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.azure-springAll azure-spring related issuescustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions