-
Notifications
You must be signed in to change notification settings - Fork 191
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
Native executable run fails with Error creating bean with name 'couchbaseClusterEnvironment' #1892
Comments
Hi @mikereiche, |
Which JDK are you using? These are my current choices, and only 21.0.1 is accepted by mvnw (apparently), and it's not a graalVm. (even though it will run with The downloads have GraalVM 21 and 22, but the highest JDK version they are for is 17. https://www.oracle.com/downloads/graalvm-downloads.html
|
Was able to reproduce with the 20.0.1 that I have after changing the java.version in pom.xml from 21 to 20
|
It sounds like this issue : https://stackoverflow.com/questions/74908739/spring-boot-3-native-image-with-jackson . We just need to figure out how to solve it. see also https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html |
Ok - if you run this:
And then copy the output:
then build
it will run without erroring out at that point. And even do the insert/get in my CommandRunner (CommandRunner: found document ...)
|
Hi @mikereiche, I've just updated my sample with the Dockerfile, so that we would definitely have the same environments for both building and running the sample. If you wanna build, do not forget to give some juice to your docker desktop since native builds are resource hoarders. After created this ticket, I had run the native tracing agent and generated bunch of reflections already. But to be frank, I haven't had to generate any reflections for a managed dependency up until now. That's why I had to open to this ticket and ask if this library is fully spring-native compatible or not. It's totally fine generating additional reflections but maybe we can add this in a doc or something for feature references. WDYT? Thanks again for all your efforts,
|
As you determined, it doesn't work without adding reflections and it does work with adding reflections.
We could say something like - "For using GraalVM Native Images with Spring Boot refer to Spring Boot GraalVM Native Image Support". But given that the Couchbase Java SDK is not supported for GraalVM Native Images, I don't want to send developers down that path. |
A successfully built artifact with the latest spring boot and spring-data-couchbase versions have been failing on runtime.
I sure know that we need to register a few reflections in order to make it work but should we? I mean the question is that is spring-data-couchbase fully spring-native supported or some reflections have to be generated?
couchbase-demo's runtime fails branch can be used to replicate this issue.
The text was updated successfully, but these errors were encountered: