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
Thanks for reporting an issue, please review the task list below before submitting the
issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.
Example that reproduces the problem uploaded to Github
Full description of the issue provided (see below)
Expected Behaviour
The native image build should succeed
Actual Behaviour
Native image build fails with error:
.Example error (but not comprehensive)
Error: Classes that should be initialized at run time got initialized during image building:
io.micrometer.shaded.io.netty.util.internal.PlatformDependent was unintentionally initialized at build time. To see why io.micrometer.shaded.io.netty.util.internal.PlatformDependent got initialized use -H:+TraceClassInitialization
io.micrometer.shaded.io.netty.util.internal.PlatformDependent0 was unintentionally initialized at build time. To see why io.micrometer.shaded.io.netty.util.internal.PlatformDependent0 got initialized use -H:+TraceClassInitialization
Error: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Trace:
at parsing io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhost4LazyHolder.access$000(NetUtilSubstitutions.java:54)
Call path from entry point to io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhost4LazyHolder.access$000():
no path found from entry point to target method
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.net.Inet6Address are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Trace:
at parsing io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder.access$200(NetUtilSubstitutions.java:84)
Call path from entry point to io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder.access$200():
at io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder.access$200(NetUtilSubstitutions.java:84)
at io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostAccessor.get(NetUtilSubstitutions.java:76)
at io.micrometer.shaded.reactor.netty.udp.UdpClient.getHost(UdpClient.java:552)
at io.micrometer.shaded.reactor.netty.udp.UdpClient.lambda$port$6(UdpClient.java:334)
at io.micrometer.shaded.reactor.netty.udp.UdpClient$$Lambda$3461/0x00000007c2461c40.apply(Unknown Source)
at sun.security.ec.XECParameters$1.get(XECParameters.java:183)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:190)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:143)
at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:331)
at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
com.oracle.svm.core.util.UserError$UserException: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Trace:
at parsing io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhost4LazyHolder.access$000(NetUtilSubstitutions.java:54)
Call path from entry point to io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhost4LazyHolder.access$000():
no path found from entry point to target method
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.net.Inet6Address are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Trace:
at parsing io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder.access$200(NetUtilSubstitutions.java:84)
Call path from entry point to io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder.access$200():
at io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder.access$200(NetUtilSubstitutions.java:84)
at io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostAccessor.get(NetUtilSubstitutions.java:76)
at io.micrometer.shaded.reactor.netty.udp.UdpClient.getHost(UdpClient.java:552)
at io.micrometer.shaded.reactor.netty.udp.UdpClient.lambda$port$6(UdpClient.java:334)
at io.micrometer.shaded.reactor.netty.udp.UdpClient$$Lambda$3461/0x00000007c2461c40.apply(Unknown Source)
at sun.security.ec.XECParameters$1.get(XECParameters.java:183)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:190)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:143)
at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:331)
at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
at com.oracle.svm.core.util.UserError.abort(UserError.java:79)
at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:765)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:555)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:468)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 2 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Trace:
at parsing io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhost4LazyHolder.access$000(NetUtilSubstitutions.java:54)
Call path from entry point to io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhost4LazyHolder.access$000():
no path found from entry point to target method
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.net.Inet6Address are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Trace:
at parsing io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder.access$200(NetUtilSubstitutions.java:84)
Call path from entry point to io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder.access$200():
at io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder.access$200(NetUtilSubstitutions.java:84)
at io.micrometer.shaded.io.netty.util.NetUtilSubstitutions$NetUtilLocalhostAccessor.get(NetUtilSubstitutions.java:76)
at io.micrometer.shaded.reactor.netty.udp.UdpClient.getHost(UdpClient.java:552)
at io.micrometer.shaded.reactor.netty.udp.UdpClient.lambda$port$6(UdpClient.java:334)
at io.micrometer.shaded.reactor.netty.udp.UdpClient$$Lambda$3461/0x00000007c2461c40.apply(Unknown Source)
at sun.security.ec.XECParameters$1.get(XECParameters.java:183)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:190)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:143)
at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:331)
at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:762)
... 8 more
Error: Image build request failed with exit status 1
The build succeeded when I removed the io.micronaut.micrometer:micronaut-micrometer-registry-statsd dependency.
The text was updated successfully, but these errors were encountered:
Hey, would be glad to know if there's any progress on this issue please 🙏
I'm experiencing the same behavior with Micronaut 3.2.3 and JDK GraalVM CE 21.3.0 (Java 17.0.1). @brianwyka Were you able to work around this somehow?
Thanks for reporting an issue, please review the task list below before submitting the
issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.
NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (https://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.
Task List
Expected Behaviour
The native image build should succeed
Actual Behaviour
Native image build fails with error:
.Example error (but not comprehensive)
Environment Information
Ubuntu 20.04
2.5.0
GraalVM ce Java 11 20.2.0
Example Application
https://github.com/brianwyka/micronaut-graal-micrometer-statsd
Steps to Reproduce
Attempted Resolutions
Updated the
native-image.properties
configuration to include:Then results in this:
The build succeeded when I removed the
io.micronaut.micrometer:micronaut-micrometer-registry-statsd
dependency.The text was updated successfully, but these errors were encountered: