Closed glaforge closed 3 years ago
This is due to a bug in GraalVM which is fixed in their master branch
Thanks @jameskleeh for the update. I reverted to Micronaut 2.5.6 in the meantime (which worked for me). Do you have a link a GraalVM ticket about that bug?
@glaforge I wish I did. When we discovered the bug it was already fixed. So I'm not sure which issue would have fixed it
as a workaround you can add javax.inject
to your compile classpath https://search.maven.org/artifact/javax.inject/javax.inject/1/jar
@glaforge if you want to use Micronaut 3.0 you can download GraalVM 21.2.0-dev from https://github.com/graalvm/graalvm-ce-dev-builds/releases which contains the fix.
The new version of GraalVM has fixed this issue
I created a simple application with the launcher, without any specific feature, with version 3.0.0-M2 of the framework, and added the following controller:
When I try to build a native image within a Docker container, with `./gradlew dockerBuildNative, I get:
If I change to 3.0.0-M1 in
gradle.properties
then this time, I get:Lastly, if I change the Micronaut version to
2.5.6
ingradle.properties
, I was getting:This last error actually means that there's not enough memory in Docker Desktop. If I increase the memory to 8GB, I can build the native image successfully.