Skip to content
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

Use graalvmNativeCompile gradle task instead of calling native-image command directly #233

Closed
devatherock opened this issue May 6, 2023 · 0 comments · Fixed by #254
Closed
Labels
bug Something isn't working

Comments

@devatherock
Copy link
Owner

When upgrading graalvm base image from ol8-java11-22.1.0 to ol8-java17-22.3.2 or even ol8-java11-22.2.0, the below error occurs:

#10 10.89 Fatal error: java.lang.IllegalAccessError: class io.micronaut.buffer.netty.NettyFeature (in unnamed module @0x27bcb4ad) cannot access class com.oracle.svm.core.jdk.SystemPropertiesSupport (in module org.graalvm.nativeimage.builder) because module org.graalvm.nativeimage.builder does not export com.oracle.svm.core.jdk to unnamed module @0x27bcb4ad
#10 10.89 	at io.micronaut.buffer.netty.NettyFeature.beforeAnalysis(NettyFeature.java:64)
#10 10.89 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$9(NativeImageGenerator.java:722)
#10 10.89 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:78)
#10 10.89 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:722)
#10 10.89 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:564)
#10 10.89 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:521)
#10 10.89 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:407)
#10 10.89 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:585)
#10 10.89 	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:128)
#10 10.89 ------------------------------------------------------------------------------------------------------------------------

According to comments on this issue, using the gradle task avoids the error. Refer this StackOverflow answer for an example of configuring the plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant