Compilation Error: org.springframework.cloud.sleuth.autoconfig._FactoryProvider issue #673
Comments
Do you have a minimal, sample application we could take a look at? Something we can git clone or download would be great. Thanks! |
Hi @bclozel This a microservice from my company, so I'll try and see if I can get it recreated in simpler service and make it publicly available. Cheers |
@bclozel Here is a very simple app https://github.com/AndersClausen/sleuth-issue that will demonstrate the issue. Please let me know if you need anything further. Thanks! |
Prior to this commit the AOT processing of Spring Factories would consider duplicate factories definitions (if by mistake a factory is defined twice in separate spring.factories files) and generate invalid code. This commit skips duplicate factories definitions. Fixes spring-atticgh-673
Thanks @AndersClausen for this sample, this is super useful as always. We've found that a spring factory was somehow defined twice, generating invalid AOT source code. We're now more defensive and avoid such problems. We've also raised spring-projects-experimental/spring-cloud-sleuth-otel#42 to fix the root cause. I've tried to build the native image with the sample project you've provided and now I'm getting a different issue. I'll create a new issue for that if necessary.
|
I'm closing this issue and I've opened a follow-up for this sample: #718 |
Prior to this commit the AOT processing of Spring Factories would consider duplicate factories definitions (if by mistake a factory is defined twice in separate spring.factories files) and generate invalid code. This commit skips duplicate factories definitions. Fixes gh-673
Hi
I'm using spring-native 0.9.1, spring-boot 2.4.4 and java 11 and when I run
mvn spring-boot:build-image
I get the following error and not sure how to fix it.The project builds fine if I remove spring-cloud-sleuth from it but I thought Sleuth was now working with spring-native based on Marcin's fix in #614.
Thanks for all your help - it's great what you're doing here.
The text was updated successfully, but these errors were encountered: