Reputation: 1
I try to generate native image of my app Quarkus on Windows.
The generation is good but not the execution because of this:
java.lang.ClassNotFoundException: io.quarkus.runner.ApplicationImpl.
io.quarkus.runner.ApplicationImpl is a generated class by Quarkus in the generated-bytecode.jar used by my Main class which runs Quarkus.run(args);
And GraalVM don't find this.
I tried this in my build.gradle:
implementation files('build/quarkus-app/quarkus/generated-bytecode.jar')
but i have some errors after :
Caused by: com.oracle.svm.core.util.VMError$HostedError: Error in @InjectAccessors handling of field org.wildfly.common.net.Inet.INET4_ANY, accessors class io.quarkus.runtime.graal.Inet4AnyAccessor: found no method named set or setINET4_ANY
and this in my execution of graalvmNative :
buildArgs.add('-Djava.library.path=build/quarkus-app/quarkus')
But whithout success.
Any ideas ? My repo : https://github.com/NotFunnyThomas/GraalQuarkusBatchPoc/
Thanks Thomas
Upvotes: 0
Views: 157
Reputation: 11
make sure that all the necessary dependencies are included and correctly configured in your build.gradle file and then Try updating your build.gradle file with the necessary GraalVM dependencies:
groovy
dependencies {
implementation 'io.quarkus:quarkus-resteasy'
implementation 'io.quarkus:quarkus-resteasy-jackson'
implementation 'io.quarkus:quarkus-hibernate-orm-panache'
implementation 'io.quarkus:quarkus-jdbc-h2'
implementation 'io.quarkus:quarkus-maven-plugin'
implementation 'org.graalvm.nativeimage:svm'
}
Upvotes: 0