Errors in Native image build.
See original GitHub issueI have the following issues in native image build this is the logs:
- Note This a project in production and I’m migrating from spring cloud to quarkus I can’t share source code. I hope the following information help.
Error: 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=<class-name>. 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.<init>(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.<init>(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.<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: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.<init>(MBeanSupport.java:139)
at com.sun.jmx.mbeanserver.MXBeanSupport.<init>(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)
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=<class-name>. 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.<init>(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.<init>(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.<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: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.<init>(MBeanSupport.java:139)
at com.sun.jmx.mbeanserver.MXBeanSupport.<init>(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=<class-name>. 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.<init>(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.<init>(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.<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: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.<init>(MBeanSupport.java:139)
at com.sun.jmx.mbeanserver.MXBeanSupport.<init>(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
orver
: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
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Fix GraalVM Native Image Build Issues - Simply-How.com
One of the most common problems when building native images are out of memory errors: Error: Image build request failed with exit status...
Read more >Native Image Build Failures · Issue #13574 · quarkusio/quarkus
The build fails with the messages shown in Actual Behavior . There appear to be unsupported features in 3 methods: A detected MBean...
Read more >Quarkus Native image building throws error - Stack Overflow
I am trying to build the native Quarkus image using the GraalVM but I am running into following Build Failure error:
Read more >Native Image Build Configuration - GraalVM
Native Image Build Configuration · Embedding a Configuration File · Configuration File Format · Memory Configuration for Building a Native Executable · Runtime...
Read more >graalvm/native-image - Gitter
im trying to use native-image to build a micronaut application, and I am getting this error $ native-image --no-server -cp myapp.jar [wayaplatform:23757] ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.