-
Notifications
You must be signed in to change notification settings - Fork 62
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
Mongock build AOT fail in Spring Boot 3.0.1 #597
Comments
Hello, we need to take a look to this in detail, but I bet is related to the conflict between Mongock using reflection and Graal Naive AOT compilation. Although that's something will support in the next version, Mongock currently doesn't provide explicit support for AOT. Anyway, we'll keep you updated as this is something that we need to address soon. |
@nhandev552 if you can build a small project to which we can access via github and try ourselves would help a lot. Thanks |
Hello @nhandev552 , could you provide that, so we can help you faster? |
Hi, @dieppa thanks for supporting. The simple project to reproduce: https://github.com/nhandev552/mongck-with-aot. I worked around by clone |
Thanks @nhandev552, for the project. We'll let you know soon. Anyway, If you thing that it's a workaround that is valiable for now, you may want to create a PR and we can take a look. Thanks!! |
I can confirm the issue. The mentioned fix is part of the solution. Second issue is that |
Even after the changes proposed, I still have issues with Mongock. Mongock works fine when the same app runs on JVM, unfortunately, the GraalVM build has the following issues. For some reason MongoSync4ChangeEntryRepository#getEntriesLog doesn't return any result. I've tried registering native hints for MongoDB Document, FindIterable, but it didn't help. The other issue is that MigrateExecutorBase#fetchAndPrepareChangeLogs doesn't return any result, even though I've registered all changelogs in native hints as well. |
Hi !
|
Hello, we are working on a workaround for this. We expect to have it at the end of this week, beginning of next week. |
Sorry, we under estimate it, not because it's complex, we know what we need to do, but because we have a lot in our plates. I will notify you when it is ready 😃 |
We wanted to provide official support in the next major release. However, this is getting more and more attention and we won't be able to contain it much longer. So we have decided to provide a decent workaround to allow you guys to carry on working and add it in the next release as part of the core. We did a POC to check the work needed and we are confident in releasing the workaround soon. |
Hello @mathieuales , @Rocker93 and @nhandev552 , sorry for the delay. As mentioned, we'll provide official support with a proper solution in the next major release, however, as there is a clear demand for this, we have release a workaround with the expectation you can carry on working until the official GraaVM support is released. We have create an example that you can pull form this repo. Please let us know if you find anything or you need some help. Thanks for the patience. |
Thanks for example, i'll try this asap |
hello, what is the current state @dieppa ? Is there official support by mongock library or do I have to use that work around? |
In the next major release we'll provide official support, but it won't be in this first quarter. Probably, starting Q2 |
I put together a small |
Description
Mongock build AOT fail in Spring Boot 3.0.1
Mongock
Environment
Steps to Reproduce
mvn spring-boot:process-aot
Behaviour
Actual behavior:
Constructor binding in a native image requires compilation with -parameters but the following classes were compiled without it: io.mongock.driver.mongodb.springdata.v4.config.MongoDBConfiguration$WriteConcernLevel
Link to repository using Mongock
[While not mandatory, accessing to the real code that uses Mongock, would help to solve the issue]
Additional context
Log
The text was updated successfully, but these errors were encountered: