-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Error creating native image with 'com.azure.spring:spring-cloud-azure-starter-servicebus' in Spring Boot 3.3.X #43914
Comments
I change to implementation platform("com.azure.spring:spring-cloud-azure-dependencies:5.19.0") and implementation "com.azure.spring:spring-cloud-azure-starter-servicebus". My first problem was azure jar signatures but the solution already exists in Issue 30320 with this configuration:
bootBuildImage {
Now my problem is:
I added
But nothing , the problem persists. Jose |
Works with this configuration: bootBuildImage { But what should I do with the list of warnings? [creator] ================================================================================ |
The imagen native faill when starts with it error: ubuntu@instance-ubuntu:~/DemoNativeGraalVM$ docker logs 797817a7191f . ____ _ __ _ _ :: Spring Boot :: (v3.3.8) 2025-01-24 20:00:52 [main] - HikariPool-1 - Starting... APPLICATION FAILED TO START Description: Parameter 1 of constructor in com.azure.spring.cloud.autoconfigure.implementation.context.AzureTokenCredentialAutoConfiguration required a bean of type 'com.azure.spring.cloud.autoconfigure.implementation.context.properties.AzureGlobalProperties' that could not be found. Action: Consider defining a bean of type 'com.azure.spring.cloud.autoconfigure.implementation.context.properties.AzureGlobalProperties' in your configuration. |
Solved registering the bean manually. /**
@bean |
@saragluna could you help route this issue from @joedayz |
My repo is https://github.com/joedayz/DemoNativeGraalVM . For now works!! I registered the bean manually. I will be adding more dependencies related with azure services and report the issues. Thanks Guys Jose |
close for same issue as #43924 |
Describe the bug
I have a spring boot project and try to add a new dependency spring-cloud-azure-starter-servicebus
dependencies {
// Importar las dependencias de Spring Cloud Azure
implementation platform("com.azure.spring:spring-cloud-azure-dependencies:5.19.0")
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation "com.azure.spring:spring-cloud-azure-starter-servicebus"
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.microsoft.sqlserver:mssql-jdbc'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
Exception or Stack Trace
[creator] Error: Classes that should be initialized at run time got initialized during image building:
[creator] org.slf4j.helpers.Reporter the class was requested to be initialized at run time (from command line with 'org.slf4j.helpers.Reporter'). To see why org.slf4j.helpers.Reporter got initialized use --trace-class-initialization=org.slf4j.helpers.Reporter
[creator] To see how the classes got initialized, use --trace-class-initialization=org.slf4j.helpers.Reporter
[creator] com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building:
[creator] org.slf4j.helpers.Reporter the class was requested to be initialized at run time (from command line with 'org.slf4j.helpers.Reporter'). To see why org.slf4j.helpers.Reporter got initialized use --trace-class-initialization=org.slf4j.helpers.Reporter
[creator] To see how the classes got initialized, use --trace-class-initialization=org.slf4j.helpers.Reporter
[creator] at com.oracle.svm.core.util.UserError.abort(UserError.java:73)
[creator] at com.oracle.svm.hosted.classinitialization.ProvenSafeClassInitializationSupport.checkDelayedInitialization(ProvenSafeClassInitializationSupport.java:277)
[creator] at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:164)
[creator] at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$10(NativeImageGenerator.java:770)
[creator] at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:86)
[creator] at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$11(NativeImageGenerator.java:770)
[creator] at com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:179)
[creator] at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:767)
[creator] at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:582)
[creator] at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:539)
[creator] at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:408)
[creator] at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:612)
[creator] at com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:134)
[creator] at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)
[creator] at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:626)
[creator] --------------------------------------------------------------------------------
[creator] 13.8s (18.5% of total time) in 72 GCs | Peak RSS: 6.77GB | CPU load: 7.07
To Reproduce
Steps to reproduce the behavior:
Clone the repo: https://github.com/joedayz/DemoNativeGraalVM
./gradlew bootBuildImage
Expected behavior
Native image created successfully.
Setup (please complete the following information):
Help me
Jose
The text was updated successfully, but these errors were encountered: