You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a scenario where we are loading a bean using a custom annotation with the help of ImportBeanDefinitionRegistrar but bean is not loaded and we are getting below exception
Gradle bootRun task is working fine.
We have generated an executable(working fine), now while running the executable we are getting the issue, we are using graalvm 17. Facing the same issue with graalvm 21 and graalvm 23
java version "17.0.13" 2024-10-15 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 17.0.13+10.1 (build 17.0.13+10-LTS-jvmci-23.0-b49)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 17.0.13+10.1 (build 17.0.13+10-LTS-jvmci-23.0-b49, mixed mode, sharing)
Operating System and Version
Linux 4.18.0-372.105.1.el8_6.x86_64 #1 SMP x86_64 GNU/Linux
Build Command
gradle nativeRun
Expected Behavior
our expectation is that the bean to be loaded while using ImportBeanDefinitionRegistrar
Actual Behavior
executable is generated perfectly fine, issue only while running the executable.
Steps to Reproduce
gradle nativeRun : this is the command we can use to reproduce the issue.
Additional Context
No response
Build Log Output and Error Messages
APPLICATION FAILED TO START
Description:
Parameter 0 of constructor in com.example.practice.service.CustomerService required a bean of type 'com.example.practice.client.CustomerClient' that could not be found.
Action:
Consider defining a bean of type 'com.example.practice.client.CustomerClient' in your configuration.
The text was updated successfully, but these errors were encountered:
Could you please try generating the metadata configuration files using the tracing agent? This could solve the issue that you're facing.
I see that you're using gradle so this documentation should help you.
yes we have followed the mentioned document and generate the metadata configuration file using the tracing agent, we have placed the generated reflect-config.json file inside \src\main\resources\META-INF\native-image and also added some more configuration which was not added by tracing agent automatically, but the error didn't resolve.
I'm afraid I can't use the zip file you attached as a reproducer to investigate this issue any further. Could you please add your reproducer to a github repo and share it with me please?
I'm afraid I can't use the zip file you attached as a reproducer to investigate this issue any further. Could you please add your reproducer to a github repo and share it with me please?
When trying to reproduce the issue I got the following error: Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
I am using Gradle 8.11.1
Perhaps we are using different Gradle versions?
Describe the Issue
We have a scenario where we are loading a bean using a custom annotation with the help of
ImportBeanDefinitionRegistrar
but bean is not loaded and we are getting below exceptionGradle
bootRun
task is working fine.We have generated an executable(working fine), now while running the executable we are getting the issue, we are using
graalvm 17
. Facing the same issue withgraalvm 21
andgraalvm 23
Please find the reproducer.
practice.zip
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
java version "17.0.13" 2024-10-15 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 17.0.13+10.1 (build 17.0.13+10-LTS-jvmci-23.0-b49)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 17.0.13+10.1 (build 17.0.13+10-LTS-jvmci-23.0-b49, mixed mode, sharing)
Operating System and Version
Linux 4.18.0-372.105.1.el8_6.x86_64 #1 SMP x86_64 GNU/Linux
Build Command
gradle nativeRun
Expected Behavior
our expectation is that the bean to be loaded while using ImportBeanDefinitionRegistrar
Actual Behavior
executable is generated perfectly fine, issue only while running the executable.
Steps to Reproduce
Additional Context
No response
Build Log Output and Error Messages
APPLICATION FAILED TO START
Description:
Parameter 0 of constructor in com.example.practice.service.CustomerService required a bean of type 'com.example.practice.client.CustomerClient' that could not be found.
Action:
Consider defining a bean of type 'com.example.practice.client.CustomerClient' in your configuration.
The text was updated successfully, but these errors were encountered: