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
Ebean is not currently compatible with native-image out of the box. There are 4 issues to address:
Use of _ebean_props field via reflection (that ebean uses on startup only)
Use of reflection to create an initial "prototype instance" for each entity bean (ebean uses reflection to create a prototype for all the concrete entity beans)
Use of invoke dynamic when using DTO Queries (this also classifies as reflection)
Via avaje-config, optional use of application.properties / application.yaml in as resources included in the image. We can fix this in avaje-config itself.
The way to fix these issues is to register each entity bean (including abstract ones) for reflection via reflect-config.json.
For projects using the querybean-generator annotation processor [to generate query beans] we will get this annotation processor to additionally generate the reflect-config.json for us. So then it will all work out-of-the-box except for DTO queries.
I'm pondering adding an annotation such that we can specify the classes we are using for DTO queries and then the querybean-generator can additionally register those classes in the generated reflect-config.json.
Also note that avaje-config 3.9 supports native-image in terms of embedded resources (e.g. having a src/main/resources/application.properties included in the built image).
Expected behavior
Native compile in linux
The text was updated successfully, but these errors were encountered: