quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.55k stars 2.62k forks source link

Errors in Native image build. #11923

Closed mostafacs closed 6 months ago

mostafacs commented 4 years ago

I have the following issues in native image build this is the logs:

com.oracle.svm.core.util.UserError$UserException: Unsupported features in 5 methods Detailed message: Error: Detected a MBean server in the image heap. This is currently not supported, but could be changed in the future. Management beans are registered in many global caches that would need to be cleared and properly re-built at image build time. Class of disallowed object: com.sun.jmx.mbeanserver.JmxMBeanServer To see how this object got instantiated use -H:+TraceClassInitialization. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image run time by using the option --initialize-at-run-time=. Or you can write your own initialization methods and call them explicitly from your main entry point. Trace: Object was reached by indexing into array constant java.lang.Object[]@32c8c8f2 reached by reading field java.util.ArrayList.elementData of constant java.util.ArrayList@6063f3dd reached by scanning method javax.management.MBeanServerFactory.addMBeanServer(MBeanServerFactory.java:418) Call path from entry point to javax.management.MBeanServerFactory.addMBeanServer(MBeanServer): at javax.management.MBeanServerFactory.addMBeanServer(MBeanServerFactory.java:418) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:232) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:192) at com.oracle.svm.core.jdk.management.ManagementSupport.getPlatformMBeanServer(ManagementSupport.java:250) at com.oracle.svm.core.jdk.management.Target_java_lang_management_ManagementFactory.getPlatformMBeanServer(Target_java_lang_management_ManagementFactory.java:45) at com.mysql.cj.jdbc.jmx.LoadBalanceConnectionGroupManager.registerJmx(LoadBalanceConnectionGroupManager.java:54) at com.mysql.cj.jdbc.ConnectionGroupManager.registerJmx(ConnectionGroupManager.java:63) at com.mysql.cj.jdbc.ha.LoadBalancedConnectionProxy.(LoadBalancedConnectionProxy.java:151) at com.mysql.cj.jdbc.ha.LoadBalancedConnectionProxy.createProxyInstance(LoadBalancedConnectionProxy.java:120) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:205) at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:200) at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:419) at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:401) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:748) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0) Error: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization. Trace: Object was reached by reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of constant java.net.InetSocketAddress$InetSocketAddressHolder@3543df40 reached by reading field java.net.InetSocketAddress.holder of constant java.net.InetSocketAddress@608d82d5 reached by reading field io.netty.resolver.dns.SingletonDnsServerAddresses.address of constant io.netty.resolver.dns.SingletonDnsServerAddresses@6b3bf4a7 reached by scanning method io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139) Call path from entry point to io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(): at io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139) at io.vertx.core.impl.resolver.DnsResolverProvider.(DnsResolverProvider.java:91) at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:442) at com.oracle.svm.reflect.Vertx_createDnsClient_fdaf24b85d60109c8dc2c64f22ef6b3238cbc4ee_7319.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Method.java:498) at org.jboss.resteasy.microprofile.client.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:144) at com.sun.proxy.$Proxy354.getCancelTimeoutMutex(Unknown Source) at com.mysql.cj.CancelQueryTaskImpl$1.run(CancelQueryTaskImpl.java:88) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0) Error: No instances of sun.security.provider.NativePRNG are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization. Trace: Object was reached by reading field java.security.SecureRandom.secureRandomSpi of constant java.security.SecureRandom@7666b982 reached by reading field sun.security.ssl.SSLContextImpl.secureRandom of constant sun.security.ssl.SSLContextImpl$TLSContext@46bcf94b reached by reading field sun.security.ssl.SSLSocketFactoryImpl.context of constant sun.security.ssl.SSLSocketFactoryImpl@2d8f21ae reached by reading field org.apache.http.conn.ssl.SSLConnectionSocketFactory.socketfactory of constant org.apache.http.conn.ssl.SSLConnectionSocketFactory@21710c0a reached by reading field java.util.concurrent.ConcurrentHashMap$Node.val of constant java.util.concurrent.ConcurrentHashMap$Node@5fa2ce89 reached by indexing into array constant java.util.concurrent.ConcurrentHashMap$Node[]@7b4c1293 reached by reading field java.util.concurrent.ConcurrentHashMap.table of constant java.util.concurrent.ConcurrentHashMap@5cfad4cf reached by reading field org.apache.http.config.Registry.map of constant org.apache.http.config.Registry@78d12023 reached by reading field org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.socketFactoryRegistry of constant org.apache.http.impl.conn.DefaultHttpClientConnectionOperator@5b894391 reached by reading field org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connectionOperator of constant org.apache.http.impl.conn.PoolingHttpClientConnectionManager@632fdabd reached by reading field org.apache.http.impl.client.HttpClientBuilder$2.val$cm of constant org.apache.http.impl.client.HttpClientBuilder$2@50a45bb4 reached by indexing into array constant java.lang.Object[]@1553416 reached by reading field java.util.ArrayList.elementData of constant java.util.ArrayList@2dd37097 reached by reading field org.apache.http.impl.client.InternalHttpClient.closeables of constant org.apache.http.impl.client.InternalHttpClient@1af12100 reached by reading field org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.httpClient of constant org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine@9d6067e reached by reading field org.jboss.resteasy.client.jaxrs.internal.ResteasyClientImpl.httpEngine of constant org.jboss.resteasy.microprofile.client.impl.MpClient@1b8006d5 reached by reading field org.jboss.resteasy.microprofile.client.ProxyInvocationHandler.client of constant org.jboss.resteasy.microprofile.client.ProxyInvocationHandler@445f7f72 reached by reading field java.lang.reflect.Proxy.h of constant com.sun.proxy.$Proxy367@57b01c00 reached by reading field io.quarkus.arc.impl.InstanceHandleImpl.instance of constant io.quarkus.arc.impl.ContextInstanceHandleImpl@7c1696d8 reached by reading field io.quarkus.arc.impl.LazyValue.value of constant io.quarkus.arc.impl.LazyValue@65e7384e reached by reading field java.util.concurrent.ConcurrentHashMap$Node.val of constant java.util.concurrent.ConcurrentHashMap$Node@681c5f41 reached by indexing into array constant java.util.concurrent.ConcurrentHashMap$Node[]@4f8afc74 reached by reading field java.util.concurrent.ConcurrentHashMap.table of constant java.util.concurrent.ConcurrentHashMap@712ef41a reached by reading field io.quarkus.arc.impl.ComputingCache.map of constant io.quarkus.arc.impl.ComputingCache@e6dd31a reached by reading field io.quarkus.arc.impl.AbstractSharedContext.instances of constant io.quarkus.arc.impl.SingletonContext@4a7c2357 reached by reading field io.quarkus.arc.impl.ArcContainerImpl.singletonContext of constant io.quarkus.arc.impl.ArcContainerImpl@6c2d4e4d reached by reading field java.util.concurrent.atomic.AtomicReference.value of constant java.util.concurrent.atomic.AtomicReference@4d17c230 reached by scanning method io.quarkus.arc.Arc.shutdown(Arc.java:45) Call path from entry point to io.quarkus.arc.Arc.shutdown(): at io.quarkus.arc.Arc.shutdown(Arc.java:45) at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:39) at java.lang.Thread.run(Thread.java:748) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0) Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method sun.misc.URLClassPath.getLookupCacheURLs(ClassLoader) is reachable To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time. Trace: at parsing sun.misc.URLClassPath.initLookupCache(URLClassPath.java:359) Call path from entry point to sun.misc.URLClassPath.initLookupCache(ClassLoader): at sun.misc.URLClassPath.initLookupCache(URLClassPath.java:359) at sun.misc.Launcher$ExtClassLoader.(Launcher.java:177) at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:159) at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:152) at com.oracle.svm.core.jdk.Target_java_security_AccessController.doPrivileged(SecuritySubstitutions.java:119) at java.net.Socket.getInputStream(Socket.java:929) at com.arjuna.ats.internal.arjuna.recovery.Connection.run(Connection.java:85) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0) Error: type is not available in this platform: org.graalvm.compiler.hotspot.management.AggregatedMemoryPoolBean Trace: Object was reached by reading field java.lang.ref.Reference.referent of constant java.util.WeakHashMap$Entry@3466b6f reached by indexing into array constant java.util.WeakHashMap$Entry[]@7046cd7c reached by reading field java.util.WeakHashMap.table of constant com.sun.jmx.mbeanserver.MBeanIntrospector$MBeanInfoMap@47e1c011 reached by scanning method com.sun.jmx.mbeanserver.MXBeanIntrospector.getMBeanInfoMap(MXBeanIntrospector.java:68) Call path from entry point to com.sun.jmx.mbeanserver.MXBeanIntrospector.getMBeanInfoMap(): at com.sun.jmx.mbeanserver.MXBeanIntrospector.getMBeanInfoMap(MXBeanIntrospector.java:68) at com.sun.jmx.mbeanserver.MBeanIntrospector.getClassMBeanInfo(MBeanIntrospector.java:416) at com.sun.jmx.mbeanserver.MBeanIntrospector.getMBeanInfo(MBeanIntrospector.java:392) at com.sun.jmx.mbeanserver.MBeanSupport.(MBeanSupport.java:139) at com.sun.jmx.mbeanserver.MXBeanSupport.(MXBeanSupport.java:66) at com.sun.jmx.mbeanserver.Introspector.makeDynamicMBean(Introspector.java:202) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:898) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) at com.sun.jmx.mbeanserver.JmxMBeanServer$2.run(JmxMBeanServer.java:1225) at com.oracle.svm.core.jdk.Target_java_security_AccessController.doPrivileged(SecuritySubstitutions.java:119) at java.net.Socket.getInputStream(Socket.java:929) at com.arjuna.ats.internal.arjuna.recovery.Connection.run(Connection.java:85) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(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.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:163)

Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 5 methods Detailed message: Error: Detected a MBean server in the image heap. This is currently not supported, but could be changed in the future. Management beans are registered in many global caches that would need to be cleared and properly re-built at image build time. Class of disallowed object: com.sun.jmx.mbeanserver.JmxMBeanServer To see how this object got instantiated use -H:+TraceClassInitialization. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image run time by using the option --initialize-at-run-time=. Or you can write your own initialization methods and call them explicitly from your main entry point. Trace: Object was reached by indexing into array constant java.lang.Object[]@32c8c8f2 reached by reading field java.util.ArrayList.elementData of constant java.util.ArrayList@6063f3dd reached by scanning method javax.management.MBeanServerFactory.addMBeanServer(MBeanServerFactory.java:418) Call path from entry point to javax.management.MBeanServerFactory.addMBeanServer(MBeanServer): at javax.management.MBeanServerFactory.addMBeanServer(MBeanServerFactory.java:418) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:232) at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:192) at com.oracle.svm.core.jdk.management.ManagementSupport.getPlatformMBeanServer(ManagementSupport.java:250) at com.oracle.svm.core.jdk.management.Target_java_lang_management_ManagementFactory.getPlatformMBeanServer(Target_java_lang_management_ManagementFactory.java:45) at com.mysql.cj.jdbc.jmx.LoadBalanceConnectionGroupManager.registerJmx(LoadBalanceConnectionGroupManager.java:54) at com.mysql.cj.jdbc.ConnectionGroupManager.registerJmx(ConnectionGroupManager.java:63) at com.mysql.cj.jdbc.ha.LoadBalancedConnectionProxy.(LoadBalancedConnectionProxy.java:151) at com.mysql.cj.jdbc.ha.LoadBalancedConnectionProxy.createProxyInstance(LoadBalancedConnectionProxy.java:120) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:205) at io.agroal.pool.ConnectionFactory.createConnection(ConnectionFactory.java:200) at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:419) at io.agroal.pool.ConnectionPool$CreateConnectionTask.call(ConnectionPool.java:401) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:748) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0) Error: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization. Trace: Object was reached by reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of constant java.net.InetSocketAddress$InetSocketAddressHolder@3543df40 reached by reading field java.net.InetSocketAddress.holder of constant java.net.InetSocketAddress@608d82d5 reached by reading field io.netty.resolver.dns.SingletonDnsServerAddresses.address of constant io.netty.resolver.dns.SingletonDnsServerAddresses@6b3bf4a7 reached by scanning method io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139) Call path from entry point to io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(): at io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139) at io.vertx.core.impl.resolver.DnsResolverProvider.(DnsResolverProvider.java:91) at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:442) at com.oracle.svm.reflect.Vertx_createDnsClient_fdaf24b85d60109c8dc2c64f22ef6b3238cbc4ee_7319.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Method.java:498) at org.jboss.resteasy.microprofile.client.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:144) at com.sun.proxy.$Proxy354.getCancelTimeoutMutex(Unknown Source) at com.mysql.cj.CancelQueryTaskImpl$1.run(CancelQueryTaskImpl.java:88) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0) Error: No instances of sun.security.provider.NativePRNG are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization. Trace: Object was reached by reading field java.security.SecureRandom.secureRandomSpi of constant java.security.SecureRandom@7666b982 reached by reading field sun.security.ssl.SSLContextImpl.secureRandom of constant sun.security.ssl.SSLContextImpl$TLSContext@46bcf94b reached by reading field sun.security.ssl.SSLSocketFactoryImpl.context of constant sun.security.ssl.SSLSocketFactoryImpl@2d8f21ae reached by reading field org.apache.http.conn.ssl.SSLConnectionSocketFactory.socketfactory of constant org.apache.http.conn.ssl.SSLConnectionSocketFactory@21710c0a reached by reading field java.util.concurrent.ConcurrentHashMap$Node.val of constant java.util.concurrent.ConcurrentHashMap$Node@5fa2ce89 reached by indexing into array constant java.util.concurrent.ConcurrentHashMap$Node[]@7b4c1293 reached by reading field java.util.concurrent.ConcurrentHashMap.table of constant java.util.concurrent.ConcurrentHashMap@5cfad4cf reached by reading field org.apache.http.config.Registry.map of constant org.apache.http.config.Registry@78d12023 reached by reading field org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.socketFactoryRegistry of constant org.apache.http.impl.conn.DefaultHttpClientConnectionOperator@5b894391 reached by reading field org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connectionOperator of constant org.apache.http.impl.conn.PoolingHttpClientConnectionManager@632fdabd reached by reading field org.apache.http.impl.client.HttpClientBuilder$2.val$cm of constant org.apache.http.impl.client.HttpClientBuilder$2@50a45bb4 reached by indexing into array constant java.lang.Object[]@1553416 reached by reading field java.util.ArrayList.elementData of constant java.util.ArrayList@2dd37097 reached by reading field org.apache.http.impl.client.InternalHttpClient.closeables of constant org.apache.http.impl.client.InternalHttpClient@1af12100 reached by reading field org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.httpClient of constant org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine@9d6067e reached by reading field org.jboss.resteasy.client.jaxrs.internal.ResteasyClientImpl.httpEngine of constant org.jboss.resteasy.microprofile.client.impl.MpClient@1b8006d5 reached by reading field org.jboss.resteasy.microprofile.client.ProxyInvocationHandler.client of constant org.jboss.resteasy.microprofile.client.ProxyInvocationHandler@445f7f72 reached by reading field java.lang.reflect.Proxy.h of constant com.sun.proxy.$Proxy367@57b01c00 reached by reading field io.quarkus.arc.impl.InstanceHandleImpl.instance of constant io.quarkus.arc.impl.ContextInstanceHandleImpl@7c1696d8 reached by reading field io.quarkus.arc.impl.LazyValue.value of constant io.quarkus.arc.impl.LazyValue@65e7384e reached by reading field java.util.concurrent.ConcurrentHashMap$Node.val of constant java.util.concurrent.ConcurrentHashMap$Node@681c5f41 reached by indexing into array constant java.util.concurrent.ConcurrentHashMap$Node[]@4f8afc74 reached by reading field java.util.concurrent.ConcurrentHashMap.table of constant java.util.concurrent.ConcurrentHashMap@712ef41a reached by reading field io.quarkus.arc.impl.ComputingCache.map of constant io.quarkus.arc.impl.ComputingCache@e6dd31a reached by reading field io.quarkus.arc.impl.AbstractSharedContext.instances of constant io.quarkus.arc.impl.SingletonContext@4a7c2357 reached by reading field io.quarkus.arc.impl.ArcContainerImpl.singletonContext of constant io.quarkus.arc.impl.ArcContainerImpl@6c2d4e4d reached by reading field java.util.concurrent.atomic.AtomicReference.value of constant java.util.concurrent.atomic.AtomicReference@4d17c230 reached by scanning method io.quarkus.arc.Arc.shutdown(Arc.java:45) Call path from entry point to io.quarkus.arc.Arc.shutdown(): at io.quarkus.arc.Arc.shutdown(Arc.java:45) at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:39) at java.lang.Thread.run(Thread.java:748) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0) Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method sun.misc.URLClassPath.getLookupCacheURLs(ClassLoader) is reachable To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time. Trace: at parsing sun.misc.URLClassPath.initLookupCache(URLClassPath.java:359) Call path from entry point to sun.misc.URLClassPath.initLookupCache(ClassLoader): at sun.misc.URLClassPath.initLookupCache(URLClassPath.java:359) at sun.misc.Launcher$ExtClassLoader.(Launcher.java:177) at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:159) at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:152) at com.oracle.svm.core.jdk.Target_java_security_AccessController.doPrivileged(SecuritySubstitutions.java:119) at java.net.Socket.getInputStream(Socket.java:929) at com.arjuna.ats.internal.arjuna.recovery.Connection.run(Connection.java:85) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0) Error: type is not available in this platform: org.graalvm.compiler.hotspot.management.AggregatedMemoryPoolBean Trace: Object was reached by reading field java.lang.ref.Reference.referent of constant java.util.WeakHashMap$Entry@3466b6f reached by indexing into array constant java.util.WeakHashMap$Entry[]@7046cd7c reached by reading field java.util.WeakHashMap.table of constant com.sun.jmx.mbeanserver.MBeanIntrospector$MBeanInfoMap@47e1c011 reached by scanning method com.sun.jmx.mbeanserver.MXBeanIntrospector.getMBeanInfoMap(MXBeanIntrospector.java:68) Call path from entry point to com.sun.jmx.mbeanserver.MXBeanIntrospector.getMBeanInfoMap(): at com.sun.jmx.mbeanserver.MXBeanIntrospector.getMBeanInfoMap(MXBeanIntrospector.java:68) at com.sun.jmx.mbeanserver.MBeanIntrospector.getClassMBeanInfo(MBeanIntrospector.java:416) at com.sun.jmx.mbeanserver.MBeanIntrospector.getMBeanInfo(MBeanIntrospector.java:392) at com.sun.jmx.mbeanserver.MBeanSupport.(MBeanSupport.java:139) at com.sun.jmx.mbeanserver.MXBeanSupport.(MXBeanSupport.java:66) at com.sun.jmx.mbeanserver.Introspector.makeDynamicMBean(Introspector.java:202) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:898) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) at com.sun.jmx.mbeanserver.JmxMBeanServer$2.run(JmxMBeanServer.java:1225) at com.oracle.svm.core.jdk.Target_java_security_AccessController.doPrivileged(SecuritySubstitutions.java:119) at java.net.Socket.getInputStream(Socket.java:929) at com.arjuna.ats.internal.arjuna.recovery.Connection.run(Connection.java:85) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)

    at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
    at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:762)
    ... 7 more

Error: Image build request failed with exit status 1


**Environment**
- Java version

openjdk version "1.8.0_262" OpenJDK Runtime Environment (build 1.8.0_262-b10) OpenJDK 64-Bit Server VM GraalVM CE 20.2.0 (build 25.262-b10-jvmci-20.2-b03, mixed mode)



 - Output of `uname -a` or `ver`: 
`Darwin macs-mbp 19.6.0 Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64 x86_64`

- Build Command:
`./mvnw clean package -Pnative`

**Maven Effective POM**

[effective-dependencies.pom.txt](https://github.com/quarkusio/quarkus/files/5178960/effective-dependencies.pom.txt)
geoand commented 4 years ago

Hi,

Are you using the quarkus-mysql extension in this application?

mostafacs commented 4 years ago

Hi, Yes, I added these maven dependencies. But I don't use ./mvnw quarkus:add-extension .....


        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-hibernate-orm</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-jdbc-mysql</artifactId>
        </dependency>
gsmet commented 4 years ago

Which version of Quarkus is this?

I wonder if it's not just a GraalVM version mismatch:

If it's not the issue, we will need a reproducer as I don't see us finding the issue with just this information.

mostafacs commented 4 years ago

@gsmet Thanks. currently, I use Quarkus 1.7 and GraalVM version 20.2 I will update Quarkus to 1.8.0.CR1 and back to you.

mostafacs commented 4 years ago

@gsmet I changed the GraalVm version to 20.1 and it's more time to build more than the previous try to build. But finally, it fails also with these logs:


02:12:02,789 INFO  [org.jbo.threads] JBoss Threads version 3.1.1.Final
[sw-api-0.1.0-runner:5098]     (clinit):  14,896.44 ms, 11.38 GB
[sw-api-0.1.0-runner:5098]   (typeflow): 1,164,877.57 ms, 11.38 GB
[sw-api-0.1.0-runner:5098]    (objects): 194,580.10 ms, 11.38 GB
[sw-api-0.1.0-runner:5098]   (features):   3,201.26 ms, 11.38 GB
[sw-api-0.1.0-runner:5098]     analysis: 1,395,104.16 ms, 11.38 GB
Error: Unsupported features in 3 methods
Detailed message:
Error: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Trace: Object was reached by 
        reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of
                constant java.net.InetSocketAddress$InetSocketAddressHolder@c0a80136 reached by 
        reading field java.net.InetSocketAddress.holder of
                constant java.net.InetSocketAddress@c0a80136 reached by 
        reading field io.netty.resolver.dns.SingletonDnsServerAddresses.address of
                constant io.netty.resolver.dns.SingletonDnsServerAddresses@27a4af90 reached by 
        scanning method io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
Call path from entry point to io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(): 
        at io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
        at io.vertx.core.impl.resolver.DnsResolverProvider.<init>(DnsResolverProvider.java:91)
        at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:442)
        at com.oracle.svm.reflect.Vertx_createDnsClient_fdaf24b85d60109c8dc2c64f22ef6b3238cbc4ee_7233.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.jboss.resteasy.microprofile.client.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:144)
        at com.sun.proxy.$Proxy350.getCancelTimeoutMutex(Unknown Source)
        at com.mysql.cj.CancelQueryTaskImpl$1.run(CancelQueryTaskImpl.java:88)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
        at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
Error: No instances of sun.security.provider.NativePRNG are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Trace: Object was reached by 
        reading field java.security.SecureRandom.secureRandomSpi of
                constant java.security.SecureRandom@64441ac6 reached by 
        reading field sun.security.ssl.SSLContextImpl.secureRandom of
                constant sun.security.ssl.SSLContextImpl$TLSContext@6e9f49c0 reached by 
        reading field sun.security.ssl.SSLSocketFactoryImpl.context of
                constant sun.security.ssl.SSLSocketFactoryImpl@664fddab reached by 
        reading field org.apache.http.conn.ssl.SSLConnectionSocketFactory.socketfactory of
                constant org.apache.http.conn.ssl.SSLConnectionSocketFactory@3a3d9cc9 reached by 
        reading field java.util.concurrent.ConcurrentHashMap$Node.val of
                constant java.util.concurrent.ConcurrentHashMap$Node@3fcd9422 reached by 
        indexing into array
                constant java.util.concurrent.ConcurrentHashMap$Node[]@5d7d813e reached by 
        reading field java.util.concurrent.ConcurrentHashMap.table of
                constant java.util.concurrent.ConcurrentHashMap@47ef79c7 reached by 
        reading field org.apache.http.config.Registry.map of
                constant org.apache.http.config.Registry@847e845 reached by 
        reading field org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.socketFactoryRegistry of
                constant org.apache.http.impl.conn.DefaultHttpClientConnectionOperator@25841eca reached by 
        reading field org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connectionOperator of
                constant org.apache.http.impl.conn.PoolingHttpClientConnectionManager@24d7dbd reached by 
        reading field org.apache.http.impl.client.HttpClientBuilder$2.val$cm of
                constant org.apache.http.impl.client.HttpClientBuilder$2@7f752bb2 reached by 
        indexing into array
                constant java.lang.Object[]@3ccb7206 reached by 
        reading field java.util.ArrayList.elementData of
                constant java.util.ArrayList@7f752bd1 reached by 
        reading field org.apache.http.impl.client.InternalHttpClient.closeables of
                constant org.apache.http.impl.client.InternalHttpClient@166e5041 reached by 
        reading field org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.httpClient of
                constant org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine@161cd0fc reached by 
        reading field org.jboss.resteasy.client.jaxrs.internal.ResteasyClientImpl.httpEngine of
                constant org.jboss.resteasy.microprofile.client.impl.MpClient@2fa65199 reached by 
        reading field org.jboss.resteasy.microprofile.client.ProxyInvocationHandler.client of
                constant org.jboss.resteasy.microprofile.client.ProxyInvocationHandler@3fa41f6d reached by 
        reading field java.lang.reflect.Proxy.h of
                constant com.sun.proxy.$Proxy363@6d9fb2d1 reached by 
        reading field io.quarkus.arc.impl.InstanceHandleImpl.instance of
                constant io.quarkus.arc.impl.ContextInstanceHandleImpl@34863a9f reached by 
        reading field io.quarkus.arc.impl.LazyValue.value of
                constant io.quarkus.arc.impl.LazyValue@73d825d3 reached by 
        reading field java.util.concurrent.ConcurrentHashMap$Node.val of
                constant java.util.concurrent.ConcurrentHashMap$Node@14547e17 reached by 
        indexing into array
                constant java.util.concurrent.ConcurrentHashMap$Node[]@6bcf39bb reached by 
        reading field java.util.concurrent.ConcurrentHashMap.table of
                constant java.util.concurrent.ConcurrentHashMap@95666448 reached by 
        reading field io.quarkus.arc.impl.ComputingCache.map of
                constant io.quarkus.arc.impl.ComputingCache@268dcb45 reached by 
        reading field io.quarkus.arc.impl.AbstractSharedContext.instances of
                constant io.quarkus.arc.impl.SingletonContext@5cd616c reached by 
        reading field io.quarkus.arc.impl.ArcContainerImpl.singletonContext of
                constant io.quarkus.arc.impl.ArcContainerImpl@3c8b786 reached by 
        reading field java.util.concurrent.atomic.AtomicReference.value of
                constant java.util.concurrent.atomic.AtomicReference@20f1edaf reached by 
        scanning method io.quarkus.arc.Arc.container(Arc.java:41)
Call path from entry point to io.quarkus.arc.Arc.container(): 
        at io.quarkus.arc.Arc.container(Arc.java:41)
        at io.quarkus.smallrye.context.runtime.SmallRyeContextPropagationRecorder$1.get(SmallRyeContextPropagationRecorder.java:58)
        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:345)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method sun.misc.URLClassPath.getLookupCacheURLs(ClassLoader) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Trace: 
        at parsing sun.misc.URLClassPath.initLookupCache(URLClassPath.java:359)
Call path from entry point to sun.misc.URLClassPath.initLookupCache(ClassLoader): 
        at sun.misc.URLClassPath.initLookupCache(URLClassPath.java:359)
        at sun.misc.Launcher$ExtClassLoader.<init>(Launcher.java:177)
        at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:159)
        at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:152)
        at com.oracle.svm.core.jdk.Target_java_security_AccessController.doPrivileged(SecuritySubstitutions.java:119)
        at java.net.Socket.getInputStream(Socket.java:929)
        at com.arjuna.ats.internal.arjuna.recovery.Connection.run(Connection.java:85)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
        at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)

com.oracle.svm.core.util.UserError$UserException: Unsupported features in 3 methods
Detailed message:
Error: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Trace: Object was reached by 
        reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of
                constant java.net.InetSocketAddress$InetSocketAddressHolder@c0a80136 reached by 
        reading field java.net.InetSocketAddress.holder of
                constant java.net.InetSocketAddress@c0a80136 reached by 
        reading field io.netty.resolver.dns.SingletonDnsServerAddresses.address of
                constant io.netty.resolver.dns.SingletonDnsServerAddresses@27a4af90 reached by 
        scanning method io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
Call path from entry point to io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(): 
        at io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
        at io.vertx.core.impl.resolver.DnsResolverProvider.<init>(DnsResolverProvider.java:91)
        at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:442)
        at com.oracle.svm.reflect.Vertx_createDnsClient_fdaf24b85d60109c8dc2c64f22ef6b3238cbc4ee_7233.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.jboss.resteasy.microprofile.client.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:144)
        at com.sun.proxy.$Proxy350.getCancelTimeoutMutex(Unknown Source)
        at com.mysql.cj.CancelQueryTaskImpl$1.run(CancelQueryTaskImpl.java:88)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
        at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
Error: No instances of sun.security.provider.NativePRNG are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Trace: Object was reached by 
        reading field java.security.SecureRandom.secureRandomSpi of
                constant java.security.SecureRandom@64441ac6 reached by 
        reading field sun.security.ssl.SSLContextImpl.secureRandom of
                constant sun.security.ssl.SSLContextImpl$TLSContext@6e9f49c0 reached by 
        reading field sun.security.ssl.SSLSocketFactoryImpl.context of
                constant sun.security.ssl.SSLSocketFactoryImpl@664fddab reached by 
        reading field org.apache.http.conn.ssl.SSLConnectionSocketFactory.socketfactory of
                constant org.apache.http.conn.ssl.SSLConnectionSocketFactory@3a3d9cc9 reached by 
        reading field java.util.concurrent.ConcurrentHashMap$Node.val of
                constant java.util.concurrent.ConcurrentHashMap$Node@3fcd9422 reached by 
        indexing into array
                constant java.util.concurrent.ConcurrentHashMap$Node[]@5d7d813e reached by 
        reading field java.util.concurrent.ConcurrentHashMap.table of
                constant java.util.concurrent.ConcurrentHashMap@47ef79c7 reached by 
        reading field org.apache.http.config.Registry.map of
                constant org.apache.http.config.Registry@847e845 reached by 
        reading field org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.socketFactoryRegistry of
                constant org.apache.http.impl.conn.DefaultHttpClientConnectionOperator@25841eca reached by 
        reading field org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connectionOperator of
                constant org.apache.http.impl.conn.PoolingHttpClientConnectionManager@24d7dbd reached by 
        reading field org.apache.http.impl.client.HttpClientBuilder$2.val$cm of
                constant org.apache.http.impl.client.HttpClientBuilder$2@7f752bb2 reached by 
        indexing into array
                constant java.lang.Object[]@3ccb7206 reached by 
        reading field java.util.ArrayList.elementData of
                constant java.util.ArrayList@7f752bd1 reached by 
        reading field org.apache.http.impl.client.InternalHttpClient.closeables of
                constant org.apache.http.impl.client.InternalHttpClient@166e5041 reached by 
        reading field org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.httpClient of
                constant org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine@161cd0fc reached by 
        reading field org.jboss.resteasy.client.jaxrs.internal.ResteasyClientImpl.httpEngine of
                constant org.jboss.resteasy.microprofile.client.impl.MpClient@2fa65199 reached by 
        reading field org.jboss.resteasy.microprofile.client.ProxyInvocationHandler.client of
                constant org.jboss.resteasy.microprofile.client.ProxyInvocationHandler@3fa41f6d reached by 
        reading field java.lang.reflect.Proxy.h of
                constant com.sun.proxy.$Proxy363@6d9fb2d1 reached by 
        reading field io.quarkus.arc.impl.InstanceHandleImpl.instance of
                constant io.quarkus.arc.impl.ContextInstanceHandleImpl@34863a9f reached by 
        reading field io.quarkus.arc.impl.LazyValue.value of
                constant io.quarkus.arc.impl.LazyValue@73d825d3 reached by 
        reading field java.util.concurrent.ConcurrentHashMap$Node.val of
                constant java.util.concurrent.ConcurrentHashMap$Node@14547e17 reached by 
        indexing into array
                constant java.util.concurrent.ConcurrentHashMap$Node[]@6bcf39bb reached by 
        reading field java.util.concurrent.ConcurrentHashMap.table of
                constant java.util.concurrent.ConcurrentHashMap@95666448 reached by 
        reading field io.quarkus.arc.impl.ComputingCache.map of
                constant io.quarkus.arc.impl.ComputingCache@268dcb45 reached by 
        reading field io.quarkus.arc.impl.AbstractSharedContext.instances of
                constant io.quarkus.arc.impl.SingletonContext@5cd616c reached by 
        reading field io.quarkus.arc.impl.ArcContainerImpl.singletonContext of
                constant io.quarkus.arc.impl.ArcContainerImpl@3c8b786 reached by 
        reading field java.util.concurrent.atomic.AtomicReference.value of
                constant java.util.concurrent.atomic.AtomicReference@20f1edaf reached by 
        scanning method io.quarkus.arc.Arc.container(Arc.java:41)
Call path from entry point to io.quarkus.arc.Arc.container(): 
        at io.quarkus.arc.Arc.container(Arc.java:41)
        at io.quarkus.smallrye.context.runtime.SmallRyeContextPropagationRecorder$1.get(SmallRyeContextPropagationRecorder.java:58)
        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:345)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method sun.misc.URLClassPath.getLookupCacheURLs(ClassLoader) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Trace: 
        at parsing sun.misc.URLClassPath.initLookupCache(URLClassPath.java:359)
Call path from entry point to sun.misc.URLClassPath.initLookupCache(ClassLoader): 
        at sun.misc.URLClassPath.initLookupCache(URLClassPath.java:359)
        at sun.misc.Launcher$ExtClassLoader.<init>(Launcher.java:177)
        at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:159)
        at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:152)
        at com.oracle.svm.core.jdk.Target_java_security_AccessController.doPrivileged(SecuritySubstitutions.java:119)
        at java.net.Socket.getInputStream(Socket.java:929)
        at com.arjuna.ats.internal.arjuna.recovery.Connection.run(Connection.java:85)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
        at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(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:753)
        at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:538)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:451)
        at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 3 methods
Detailed message:
Error: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Trace: Object was reached by 
        reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of
                constant java.net.InetSocketAddress$InetSocketAddressHolder@c0a80136 reached by 
        reading field java.net.InetSocketAddress.holder of
                constant java.net.InetSocketAddress@c0a80136 reached by 
        reading field io.netty.resolver.dns.SingletonDnsServerAddresses.address of
                constant io.netty.resolver.dns.SingletonDnsServerAddresses@27a4af90 reached by 
        scanning method io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
Call path from entry point to io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(): 
        at io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
        at io.vertx.core.impl.resolver.DnsResolverProvider.<init>(DnsResolverProvider.java:91)
        at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:442)
        at com.oracle.svm.reflect.Vertx_createDnsClient_fdaf24b85d60109c8dc2c64f22ef6b3238cbc4ee_7233.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.jboss.resteasy.microprofile.client.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:144)
        at com.sun.proxy.$Proxy350.getCancelTimeoutMutex(Unknown Source)
        at com.mysql.cj.CancelQueryTaskImpl$1.run(CancelQueryTaskImpl.java:88)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
        at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
Error: No instances of sun.security.provider.NativePRNG are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Trace: Object was reached by 
        reading field java.security.SecureRandom.secureRandomSpi of
                constant java.security.SecureRandom@64441ac6 reached by 
        reading field sun.security.ssl.SSLContextImpl.secureRandom of
                constant sun.security.ssl.SSLContextImpl$TLSContext@6e9f49c0 reached by 
        reading field sun.security.ssl.SSLSocketFactoryImpl.context of
                constant sun.security.ssl.SSLSocketFactoryImpl@664fddab reached by 
        reading field org.apache.http.conn.ssl.SSLConnectionSocketFactory.socketfactory of
                constant org.apache.http.conn.ssl.SSLConnectionSocketFactory@3a3d9cc9 reached by 
        reading field java.util.concurrent.ConcurrentHashMap$Node.val of
                constant java.util.concurrent.ConcurrentHashMap$Node@3fcd9422 reached by 
        indexing into array
                constant java.util.concurrent.ConcurrentHashMap$Node[]@5d7d813e reached by 
        reading field java.util.concurrent.ConcurrentHashMap.table of
                constant java.util.concurrent.ConcurrentHashMap@47ef79c7 reached by 
        reading field org.apache.http.config.Registry.map of
                constant org.apache.http.config.Registry@847e845 reached by 
        reading field org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.socketFactoryRegistry of
                constant org.apache.http.impl.conn.DefaultHttpClientConnectionOperator@25841eca reached by 
        reading field org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connectionOperator of
                constant org.apache.http.impl.conn.PoolingHttpClientConnectionManager@24d7dbd reached by 
        reading field org.apache.http.impl.client.HttpClientBuilder$2.val$cm of
                constant org.apache.http.impl.client.HttpClientBuilder$2@7f752bb2 reached by 
        indexing into array
                constant java.lang.Object[]@3ccb7206 reached by 
        reading field java.util.ArrayList.elementData of
                constant java.util.ArrayList@7f752bd1 reached by 
        reading field org.apache.http.impl.client.InternalHttpClient.closeables of
                constant org.apache.http.impl.client.InternalHttpClient@166e5041 reached by 
        reading field org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine.httpClient of
                constant org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine@161cd0fc reached by 
        reading field org.jboss.resteasy.client.jaxrs.internal.ResteasyClientImpl.httpEngine of
                constant org.jboss.resteasy.microprofile.client.impl.MpClient@2fa65199 reached by 
        reading field org.jboss.resteasy.microprofile.client.ProxyInvocationHandler.client of
                constant org.jboss.resteasy.microprofile.client.ProxyInvocationHandler@3fa41f6d reached by 
        reading field java.lang.reflect.Proxy.h of
                constant com.sun.proxy.$Proxy363@6d9fb2d1 reached by 
        reading field io.quarkus.arc.impl.InstanceHandleImpl.instance of
                constant io.quarkus.arc.impl.ContextInstanceHandleImpl@34863a9f reached by 
        reading field io.quarkus.arc.impl.LazyValue.value of
                constant io.quarkus.arc.impl.LazyValue@73d825d3 reached by 
        reading field java.util.concurrent.ConcurrentHashMap$Node.val of
                constant java.util.concurrent.ConcurrentHashMap$Node@14547e17 reached by 
        indexing into array
                constant java.util.concurrent.ConcurrentHashMap$Node[]@6bcf39bb reached by 
        reading field java.util.concurrent.ConcurrentHashMap.table of
                constant java.util.concurrent.ConcurrentHashMap@95666448 reached by 
        reading field io.quarkus.arc.impl.ComputingCache.map of
                constant io.quarkus.arc.impl.ComputingCache@268dcb45 reached by 
        reading field io.quarkus.arc.impl.AbstractSharedContext.instances of
                constant io.quarkus.arc.impl.SingletonContext@5cd616c reached by 
        reading field io.quarkus.arc.impl.ArcContainerImpl.singletonContext of
                constant io.quarkus.arc.impl.ArcContainerImpl@3c8b786 reached by 
        reading field java.util.concurrent.atomic.AtomicReference.value of
                constant java.util.concurrent.atomic.AtomicReference@20f1edaf reached by 
        scanning method io.quarkus.arc.Arc.container(Arc.java:41)
Call path from entry point to io.quarkus.arc.Arc.container(): 
        at io.quarkus.arc.Arc.container(Arc.java:41)
        at io.quarkus.smallrye.context.runtime.SmallRyeContextPropagationRecorder$1.get(SmallRyeContextPropagationRecorder.java:58)
        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:345)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method sun.misc.URLClassPath.getLookupCacheURLs(ClassLoader) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Trace: 
        at parsing sun.misc.URLClassPath.initLookupCache(URLClassPath.java:359)
Call path from entry point to sun.misc.URLClassPath.initLookupCache(ClassLoader): 
        at sun.misc.URLClassPath.initLookupCache(URLClassPath.java:359)
        at sun.misc.Launcher$ExtClassLoader.<init>(Launcher.java:177)
        at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:159)
        at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:152)
        at com.oracle.svm.core.jdk.Target_java_security_AccessController.doPrivileged(SecuritySubstitutions.java:119)
        at java.net.Socket.getInputStream(Socket.java:929)
        at com.arjuna.ats.internal.arjuna.recovery.Connection.run(Connection.java:85)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
        at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)

        at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
        at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:750)
        ... 7 more
Error: Image build request failed with exit status 1
geoand commented 4 years ago

Do you have a reproducer we could use to check?

mostafacs commented 4 years ago

@geoand I will create a reproduce repository by the end of today.

mostafacs commented 4 years ago

This is the reproducer project. When I'm using BigDecimal as a member in a model class I got this exception.

Caused by: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method sun.misc.URLClassPath.getLookupCacheURLs(ClassLoader) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.

If y replace BigDecimal with Double in components/model/src/main/java/demo/quarkus/model/Product.java. the native build will complete successfully.

Is it possible to make stacktrace more make sense? I did many experiments to get the cause of the issue.

andlinger commented 3 years ago

Following line produces the same stacktrace: DnsClient dnsClient = vertx.createDnsClient();

ANTLR Tool version 4.7.2 used for code generation does not match the current runtime version 4.8ANTLR Tool version 4.7.2 used for code generation does not match the current runtime version 4.8Error: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Detailed message:
Trace: Object was reached by 
    reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of
        constant java.net.InetSocketAddress$InetSocketAddressHolder@72431ade reached by 
    reading field java.net.InetSocketAddress.holder of
        constant java.net.InetSocketAddress@16fc200a reached by 
    reading field io.netty.resolver.dns.SingletonDnsServerAddresses.address of
        constant io.netty.resolver.dns.SingletonDnsServerAddresses@49e84e0e reached by 
    scanning method io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
Call path from entry point to io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(): 
    at io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
    at io.vertx.core.impl.resolver.DnsResolverProvider.<init>(DnsResolverProvider.java:91)
    at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:442)
    at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:429)
    at io.vertx.mutiny.core.Vertx.createDnsClient(Vertx.java:294)
    at at.example.project.backend.services.ExternalDomainService.check(ExternalDomainService.java:107)
    at at.example.project.backend.resources.ExternalDomainResource.check(ExternalDomainResource.java:63)
    at at.example.project.backend.resources.ExternalDomainResource_Subclass.check$$superaccessor2(ExternalDomainResource_Subclass.zig:582)
    at at.example.project.backend.resources.ExternalDomainResource_Subclass$$function$$2.apply(ExternalDomainResource_Subclass$$function$$2.zig:33)
    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_VARARGS:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
com.oracle.svm.core.util.UserError$UserException: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Detailed message:
Trace: Object was reached by 
    reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of
        constant java.net.InetSocketAddress$InetSocketAddressHolder@72431ade reached by 
    reading field java.net.InetSocketAddress.holder of
        constant java.net.InetSocketAddress@16fc200a reached by 
    reading field io.netty.resolver.dns.SingletonDnsServerAddresses.address of
        constant io.netty.resolver.dns.SingletonDnsServerAddresses@49e84e0e reached by 
    scanning method io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
Call path from entry point to io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(): 
    at io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
    at io.vertx.core.impl.resolver.DnsResolverProvider.<init>(DnsResolverProvider.java:91)
    at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:442)
    at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:429)
    at io.vertx.mutiny.core.Vertx.createDnsClient(Vertx.java:294)
    at at.example.project.backend.services.ExternalDomainService.check(ExternalDomainService.java:107)
    at at.example.project.backend.resources.ExternalDomainResource.check(ExternalDomainResource.java:63)
    at at.example.project.backend.resources.ExternalDomainResource_Subclass.check$$superaccessor2(ExternalDomainResource_Subclass.zig:582)
    at at.example.project.backend.resources.ExternalDomainResource_Subclass$$function$$2.apply(ExternalDomainResource_Subclass$$function$$2.zig:33)
    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_VARARGS: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: No instances of java.net.Inet4Address are allowed in the image heap as this class should be initialized at image runtime. To see how this object got instantiated use -H:+TraceClassInitialization.
Detailed message:
Trace: Object was reached by 
    reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of
        constant java.net.InetSocketAddress$InetSocketAddressHolder@72431ade reached by 
    reading field java.net.InetSocketAddress.holder of
        constant java.net.InetSocketAddress@16fc200a reached by 
    reading field io.netty.resolver.dns.SingletonDnsServerAddresses.address of
        constant io.netty.resolver.dns.SingletonDnsServerAddresses@49e84e0e reached by 
    scanning method io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
Call path from entry point to io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(): 
    at io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.defaultAddresses(DefaultDnsServerAddressStreamProvider.java:139)
    at io.vertx.core.impl.resolver.DnsResolverProvider.<init>(DnsResolverProvider.java:91)
    at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:442)
    at io.vertx.core.impl.VertxImpl.createDnsClient(VertxImpl.java:429)
    at io.vertx.mutiny.core.Vertx.createDnsClient(Vertx.java:294)
    at at.example.project.backend.services.ExternalDomainService.check(ExternalDomainService.java:107)
    at at.example.project.backend.resources.ExternalDomainResource.check(ExternalDomainResource.java:63)
    at at.example.project.backend.resources.ExternalDomainResource_Subclass.check$$superaccessor2(ExternalDomainResource_Subclass.zig:582)
    at at.example.project.backend.resources.ExternalDomainResource_Subclass$$function$$2.apply(ExternalDomainResource_Subclass$$function$$2.zig:33)
    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_VARARGS: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:126)
    at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:762)
    ... 8 more
Error: Image build request failed with exit status 1
> Task :backend:quarkusBuild FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':backend:quarkusBuild'.
> io.quarkus.builder.BuildException: Build failure: Build failed due to errors
    [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
    at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:307)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:936)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
    at java.base/java.lang.Thread.run(Thread.java:834)
    at org.jboss.threads.JBossThread.run(JBossThread.java:479)
  Caused by: java.lang.RuntimeException: Image generation failed. Exit code: 1
    at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:520)
    at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:276)
    ... 12 more

Is there a temporary workaround to get the build running again?

elrob commented 3 years ago

I'm dipping my feet into the quarkus waters but hitting an issue similar to the above. It seems micrometer is now being promoted as being supported (including mention of statsd in this blog post) but when I try and use the statsd registry I cannot build natively. (Maybe related to: https://github.com/quarkusio/quarkus/issues/12900)

Attempting to use:

 <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-registry-statsd</artifactId>
      <version>1.5.5</version>
</dependency>

With:

@Produces
    @Singleton
    public MeterRegistry configureMeterRegistry(MetricsStatsdDatadogConfigProperties metricsStatsdDatadogConfigProperties) {
    StatsdConfig statsdConfig = new StatsdConfig() {
            @Override
            public String get(String s) {
                return null;
            }

            @Override
            public boolean enabled() {
                return metricsStatsdDatadogConfigProperties.getEnabled();
            }

            @Override
            public StatsdFlavor flavor() {
                return StatsdFlavor.DATADOG;
            }

            @Override
            public String host() {
                return metricsStatsdDatadogConfigProperties.getHost();
            }
        };
    return StatsdMeterRegistry.builder(statsdConfig).build();
}

Native build error output:

Error: Unsupported features in 3 methods
Detailed message:
Error: 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: Object was reached by
    reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of
        constant java.net.InetSocketAddress$InetSocketAddressHolder@6cd74a5b reached by
    reading field java.net.InetSocketAddress.holder of
        constant java.net.InetSocketAddress@10292cee reached by
    reading field io.micrometer.shaded.io.netty.bootstrap.Bootstrap.remoteAddress of
        constant io.micrometer.shaded.io.netty.bootstrap.Bootstrap@47e92ffa reached by
    scanning method io.micrometer.shaded.reactor.netty.udp.UdpClient.configure(UdpClient.java:514)
Call path from entry point to io.micrometer.shaded.reactor.netty.udp.UdpClient.configure():
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.configure(UdpClient.java:514)
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.connect(UdpClient.java:173)
    at io.micrometer.statsd.StatsdMeterRegistry.lambda$connectAndSubscribe$11(StatsdMeterRegistry.java:276)
    at io.micrometer.statsd.StatsdMeterRegistry$$Lambda$784/0x00000007c14d5440.get(Unknown Source)
    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)
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.reactor.netty.tcp.TcpUtils._updatePort(TcpUtils.java:80)
Call path from entry point to io.micrometer.shaded.reactor.netty.tcp.TcpUtils._updatePort(SocketAddress, int):
    at io.micrometer.shaded.reactor.netty.tcp.TcpUtils._updatePort(TcpUtils.java:79)
    at io.micrometer.shaded.reactor.netty.tcp.TcpUtils.updatePort(TcpUtils.java:71)
    at io.micrometer.shaded.reactor.netty.tcp.TcpClient.lambda$port$6(TcpClient.java:427)
    at io.micrometer.shaded.reactor.netty.tcp.TcpClient$$Lambda$888/0x00000007c1508840.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)
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.reactor.netty.udp.UdpClient.getHost(UdpClient.java:552)
Call path from entry point to io.micrometer.shaded.reactor.netty.udp.UdpClient.getHost(Bootstrap):
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.getHost(UdpClient.java:547)
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.lambda$port$6(UdpClient.java:334)
    at io.micrometer.shaded.reactor.netty.udp.UdpClient$$Lambda$901/0x00000007c150c840.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 3 methods
Detailed message:
Error: 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: Object was reached by
    reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of
        constant java.net.InetSocketAddress$InetSocketAddressHolder@6cd74a5b reached by
    reading field java.net.InetSocketAddress.holder of
        constant java.net.InetSocketAddress@10292cee reached by
    reading field io.micrometer.shaded.io.netty.bootstrap.Bootstrap.remoteAddress of
        constant io.micrometer.shaded.io.netty.bootstrap.Bootstrap@47e92ffa reached by
    scanning method io.micrometer.shaded.reactor.netty.udp.UdpClient.configure(UdpClient.java:514)
Call path from entry point to io.micrometer.shaded.reactor.netty.udp.UdpClient.configure():
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.configure(UdpClient.java:514)
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.connect(UdpClient.java:173)
    at io.micrometer.statsd.StatsdMeterRegistry.lambda$connectAndSubscribe$11(StatsdMeterRegistry.java:276)
    at io.micrometer.statsd.StatsdMeterRegistry$$Lambda$784/0x00000007c14d5440.get(Unknown Source)
    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)
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.reactor.netty.tcp.TcpUtils._updatePort(TcpUtils.java:80)
Call path from entry point to io.micrometer.shaded.reactor.netty.tcp.TcpUtils._updatePort(SocketAddress, int):
    at io.micrometer.shaded.reactor.netty.tcp.TcpUtils._updatePort(TcpUtils.java:79)
    at io.micrometer.shaded.reactor.netty.tcp.TcpUtils.updatePort(TcpUtils.java:71)
    at io.micrometer.shaded.reactor.netty.tcp.TcpClient.lambda$port$6(TcpClient.java:427)
    at io.micrometer.shaded.reactor.netty.tcp.TcpClient$$Lambda$888/0x00000007c1508840.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)
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.reactor.netty.udp.UdpClient.getHost(UdpClient.java:552)
Call path from entry point to io.micrometer.shaded.reactor.netty.udp.UdpClient.getHost(Bootstrap):
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.getHost(UdpClient.java:547)
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.lambda$port$6(UdpClient.java:334)
    at io.micrometer.shaded.reactor.netty.udp.UdpClient$$Lambda$901/0x00000007c150c840.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 3 methods
Detailed message:
Error: 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: Object was reached by
    reading field java.net.InetSocketAddress$InetSocketAddressHolder.addr of
        constant java.net.InetSocketAddress$InetSocketAddressHolder@6cd74a5b reached by
    reading field java.net.InetSocketAddress.holder of
        constant java.net.InetSocketAddress@10292cee reached by
    reading field io.micrometer.shaded.io.netty.bootstrap.Bootstrap.remoteAddress of
        constant io.micrometer.shaded.io.netty.bootstrap.Bootstrap@47e92ffa reached by
    scanning method io.micrometer.shaded.reactor.netty.udp.UdpClient.configure(UdpClient.java:514)
Call path from entry point to io.micrometer.shaded.reactor.netty.udp.UdpClient.configure():
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.configure(UdpClient.java:514)
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.connect(UdpClient.java:173)
    at io.micrometer.statsd.StatsdMeterRegistry.lambda$connectAndSubscribe$11(StatsdMeterRegistry.java:276)
    at io.micrometer.statsd.StatsdMeterRegistry$$Lambda$784/0x00000007c14d5440.get(Unknown Source)
    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)
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.reactor.netty.tcp.TcpUtils._updatePort(TcpUtils.java:80)
Call path from entry point to io.micrometer.shaded.reactor.netty.tcp.TcpUtils._updatePort(SocketAddress, int):
    at io.micrometer.shaded.reactor.netty.tcp.TcpUtils._updatePort(TcpUtils.java:79)
    at io.micrometer.shaded.reactor.netty.tcp.TcpUtils.updatePort(TcpUtils.java:71)
    at io.micrometer.shaded.reactor.netty.tcp.TcpClient.lambda$port$6(TcpClient.java:427)
    at io.micrometer.shaded.reactor.netty.tcp.TcpClient$$Lambda$888/0x00000007c1508840.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)
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.reactor.netty.udp.UdpClient.getHost(UdpClient.java:552)
Call path from entry point to io.micrometer.shaded.reactor.netty.udp.UdpClient.getHost(Bootstrap):
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.getHost(UdpClient.java:547)
    at io.micrometer.shaded.reactor.netty.udp.UdpClient.lambda$port$6(UdpClient.java:334)
    at io.micrometer.shaded.reactor.netty.udp.UdpClient$$Lambda$901/0x00000007c150c840.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
ebullient commented 3 years ago

Ok. We have one request to add statsd support (which hasn't been added yet).

It should be noted that some registry types will have restrictions relating to native mode. Core micrometer works well, as do the Prometheus and JMX registries. Stackdriver support has a native mode restriction, and it appears statsd will as well.

So I would classify this last issue (re: native issues w/ statsd) as something we need to iron out in the linked item for providing integration w/ statsd (and identifying issues running statsd in native mode) separate from general issues in the native build.

andlinger commented 3 years ago

Any ideas on using Inet4Address or Inet6Address objects in native mode?

elrob commented 3 years ago

Thank you. I went down a rabbit hole of trying to deal with the native compilation errors like the tips described in this post but I ended up giving up. https://stackoverflow.com/questions/63328298/how-do-you-debug-a-no-instances-of-are-allowed-in-the-image-heap-when-buil

elrob commented 3 years ago

Comment from the PR: https://github.com/quarkusio/quarkus/pull/13037

To be clear: this enables the registry in JVM mode. Native mode is (for the moment) disabled, as I work with the micrometer team on how best to disentangle the reactor/shaded netty dependencies

murphye commented 3 years ago

Can someone make a GitHub issue to track the native mode support?

StefanOltmann commented 3 years ago

Thank you. I went down a rabbit hole of trying to deal with the native compilation errors like the tips described in this post but I ended up giving up. https://stackoverflow.com/questions/63328298/how-do-you-debug-a-no-instances-of-are-allowed-in-the-image-heap-when-buil

Same here. It's really frustrating and not well documented how to configure this. Debugging this problem is a real pain.

Thank you for the link.

At least Quarkus should provide a better documentation how to trace and fix this Inet4Address problem properly.

StefanOltmann commented 3 years ago

My application.properties looks like this:

quarkus.ssl.native=true
quarkus.native.enable-http-url-handler=true
quarkus.native.enable-https-url-handler=true
quarkus.native.additional-build-args=--initialize-at-run-time=li.pitschmann.knx.core.utils.Networker\\,li.pitschmann.knx.core.net.HPAI\\,li.pitschmann.knx.core.config.CoreConfigs --trace-class-initialization=li.pitschmann.knx.core.utils.Networker\\,li.pitschmann.knx.core.net.HPAI

I get this message:

Error: Classes that should be initialized at run time got initialized during image building:
To see how the classes got initialized, use --trace-class-initialization=li.pitschmann.knx.core.utils.Networker,li.pitschmann.knx.core.net.HPAI

But I already provided this. It has no effect.


Running Quarkus native-image plugin on GraalVM Version 20.3.0 (Java Version 11.0.9+10-jvmci-20.3-b06)
/opt/hostedtoolcache/GraalVM/java11-linux-amd64-20.3.0/x64/bin/native-image -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Dfile.encoding=UTF-8 --initialize-at-run-time=li.pitschmann.knx.core.utils.Networker,li.pitschmann.knx.core.net.HPAI,li.pitschmann.knx.core.config.CoreConfigs --trace-class-initialization=li.pitschmann.knx.core.utils.Networker,li.pitschmann.knx.core.net.HPAI --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -jar smart-home-server-0.1-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http,https --enable-all-security-services -H:NativeLinkerOption=-no-pie --no-server -H:-UseServiceLoaderFeature -H:+StackTrace smart-home-server-0.1-runner
[smart-home-server-0.1-runner:3246]    classlist:   7,571.09 ms,  0.96 GB
[smart-home-server-0.1-runner:3246]        (cap):     944.37 ms,  0.96 GB
[smart-home-server-0.1-runner:3246]        setup:   3,185.82 ms,  0.96 GB
Error: Classes that should be initialized at run time got initialized during image building:
To see how the classes got initialized, use --trace-class-initialization=li.pitschmann.knx.core.utils.Networker,li.pitschmann.knx.core.net.HPAI
 li.pitschmann.knx.core.utils.Networker the class was requested to be initialized at run time (from the command line). To see why li.pitschmann.knx.core.utils.Networker got initialized use --trace-class-initialization=li.pitschmann.knx.core.utils.Networker
li.pitschmann.knx.core.net.HPAI the class was requested to be initialized at run time (from the command line). To see why li.pitschmann.knx.core.net.HPAI got initialized use --trace-class-initialization=li.pitschmann.knx.core.net.HPAI

com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building:
 li.pitschmann.knx.core.utils.Networker the class was requested to be initialized at run time (from the command line). To see why li.pitschmann.knx.core.utils.Networker got initialized use --trace-class-initialization=li.pitschmann.knx.core.utils.Networker
li.pitschmann.knx.core.net.HPAI the class was requested to be initialized at run time (from the command line). To see why li.pitschmann.knx.core.net.HPAI got initialized use --trace-class-initialization=li.pitschmann.knx.core.net.HPAI

    at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
    at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.checkDelayedInitialization(ConfigurableClassInitialization.java:539)
    at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:226)
    at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$8(NativeImageGenerator.java:735)
    at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:70)
    at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:735)
    at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:558)
    at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:471)
    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)
Error: Image build request failed with exit status 1
[smart-home-server-0.1-runner:3246]     analysis:  24,124.93 ms,  1.70 GB
geoand commented 6 months ago

Is still an issue with the latest versions of Quarkus and GraalVM?

geoand commented 6 months ago

Closing for lack of feedback

lucamaf commented 5 months ago

this is still an issue in the latest version added the library (in this case java.net.Inet4Address) in the initialize-at-build-time variable inside the application properties but the native build is still failing