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
I have a spring-boot application. That application make use of 'prototype beans' (objects created in runtime). I instantiate them over an injected ObjectProvider in a singleton bean.
The first time I tried, I got a MissingReflectionRegistrationError with the proper data over my prototype bean factory-method. However, once I added that data in a reflect-config.json file in the Exception just became a NullPointerException.
Here the trace:
Caused by: java.lang.NullPointerException: null
at [email protected]/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644)
... 25 common frames omitted
The MethodAccessor seems to be null, but I don't know why.
Using the latest version of GraalVM can resolve many issues.
Hi @allardbe-sla,
Thank you for reaching out to us.
Perhaps there are more things that you need to add to your configuration file. To be sure, could you please try using the tracing agent which will allow you to generate the reflection metadata dynamically.
Hi,
thanks for the hint, I hadn't tried as I thought the other bits where irrelevant for my problem. I now copied the whole generated directory in my project, the generated binary is a bit bigger, but still, the same error occurred.
I also tried building in -diagnostic-mode, I had hoped to get more logging in runtime with it, but that didn't helped either.
Let me know what Information I could provide to you next.
Describe the Issue
I have a spring-boot application. That application make use of 'prototype beans' (objects created in runtime). I instantiate them over an injected ObjectProvider in a singleton bean.
The first time I tried, I got a
MissingReflectionRegistrationError
with the proper data over my prototype beanfactory-method
. However, once I added that data in a reflect-config.json file in the Exception just became a NullPointerException.Here the trace:
The MethodAccessor seems to be null, but I don't know why.
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
Tried with the latest JDK11, and then with the current 23
Operating System and Version
bullseye-20240926-slim
Troubleshooting Confirmation
Run Command
/app
Expected Behavior
just runs
Actual Behavior
crashed
Steps to Reproduce
Additional Context
I'd be glad to provide more if I knew what is relevant.
Run-Time Log Output and Error Messages
No response
The text was updated successfully, but these errors were encountered: