Closed OrdinarySF closed 1 year ago
Hi @Holmes-shuai ,
It seems like a similar issue with
Can you check to add @RegisterForReflection
?
Also it seems that you are using kotlin
?
yes , i using kotlin in the demo project.
I will try using this annotation.
I added @RegisterForReflection
to the class (User), and it started working properly after the native compiler.
Thank you very much.
Furthermore, I found on the website various tips about the additional usages of this annotation and its native applications.
Based on multiple tests, I believe this issue has been resolved, so I will to close it.
Thanks @Holmes-shuai for sharing the solution. And I'd like to mention that we also have a Chinese localization website https://cn.quarkus.io/guides/writing-native-applications-tips
Out of curious, are you interesting to contribute for the quarkus guides translations? you can get more detail from https://github.com/quarkusio/cn.quarkus.io
Thank you for @zhfeng 's invitation. I will try to translate the documentation in my spare time.
env:
demo code:
user.java
native build command: mvn package -Pnative
error message: