Repository navigation
[BUG] KafkaPropertiesBeanPostProcessor using a removed method in springboot 3.4 #43142
Description
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
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
github-actions commentedon Nov 30, 2024
Moary Chen (@moarychan) Muyao Feng (@Netyyyy) Rujun Chen (@rujche) Xiaolu Dai (@saragluna)
github-actions commentedon Nov 30, 2024
Thank you for your feedback. Tagging and routing to the team member best able to assist.
saragluna commentedon Dec 1, 2024
Thanks for reaching out, we have fixed this issue, and please wait for our next release. Moary Chen (@moarychan) fyi.
moarychan commentedon Dec 4, 2024
Fixed in #43098