Skip to content

Error: Detected a MBean server in the image heap and quarkus 2.15.3.Final #333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jonsalvas opened this issue Jan 17, 2023 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@jonsalvas
Copy link

Describe the bug
The native build with quarkus-hazelcast-client and quarkus 2.15.3.Final requiring 22.3 graalvm image leads to the following error:

Error: Unsupported features in 21 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 --trace-object-instantiation=com.sun.jmx.mbeanserver.JmxMBeanServer. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime 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
  reading field com.sun.jmx.mbeanserver.MXBeanLookup.mbsc of constant 
    com.sun.jmx.mbeanserver.MXBeanLookup@3caf5742: com.sun.jmx.mbeanserver.MXBeanLookup@3caf5742
  reading field java.lang.ref.Reference.referent of constant 
    java.lang.ref.WeakReference@478fe0d2: java.lang.ref.WeakReference@478fe0d2
  reading field java.util.HashMap$Node.value of constant 
    java.util.HashMap$Node@117e0c09: com.sun.jmx.mbeanserver.WeakIdentityHashMap$IdentityWeakReference@156f0281=java....
  indexing into array java.util.HashMap$Node[]@22c1a21e: [Ljava.util.HashMap$Node;@22c1a21e
  reading field java.util.HashMap.table of constant 
    java.util.HashMap@53fcc85: {com.sun.jmx.mbeanserver.WeakIdentityHashMap$IdentityWeakReference@156f0281=java...
  reading field com.sun.jmx.mbeanserver.WeakIdentityHashMap.map of constant 
    com.sun.jmx.mbeanserver.WeakIdentityHashMap@aa939ae: com.sun.jmx.mbeanserver.WeakIdentityHashMap@aa939ae
  scanning root com.sun.jmx.mbeanserver.WeakIdentityHashMap@aa939ae: com.sun.jmx.mbeanserver.WeakIdentityHashMap@aa939ae embedded in 
    com.sun.jmx.mbeanserver.MXBeanLookup.lookupFor(MXBeanLookup.java:93)
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 --trace-object-instantiation=com.sun.jmx.mbeanserver.JmxMBeanServer. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime 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
  reading field java.lang.ref.Reference.referent of constant 
    com.sun.jmx.mbeanserver.WeakIdentityHashMap$IdentityWeakReference@4ff6b80b: com.sun.jmx.mbeanserver.WeakIdentityHashMap$IdentityWeakReference@156f0281
  reading field java.util.HashMap$Node.key of constant 
    java.util.HashMap$Node@117e0c09: com.sun.jmx.mbeanserver.WeakIdentityHashMap$IdentityWeakReference@156f0281=java....
  indexing into array java.util.HashMap$Node[]@22c1a21e: [Ljava.util.HashMap$Node;@22c1a21e
  reading field java.util.HashMap.table of constant 
    java.util.HashMap@53fcc85: {com.sun.jmx.mbeanserver.WeakIdentityHashMap$IdentityWeakReference@156f0281=java...
  reading field com.sun.jmx.mbeanserver.WeakIdentityHashMap.map of constant 
    com.sun.jmx.mbeanserver.WeakIdentityHashMap@aa939ae: com.sun.jmx.mbeanserver.WeakIdentityHashMap@aa939ae
  scanning root com.sun.jmx.mbeanserver.WeakIdentityHashMap@aa939ae: com.sun.jmx.mbeanserver.WeakIdentityHashMap@aa939ae embedded in 
    com.sun.jmx.mbeanserver.MXBeanLookup.lookupFor(MXBeanLookup.java:93)
...

Expected behavior
Build runs successfully

To Reproduce

Steps to reproduce the behavior:

  1. Create an example project with quarkus-hazelcast-client (according to docs) using quarkus 2.15.3.Final
  2. Build it with Graalvm 22.3 Image

Additional context

Full Log:

@jonsalvas jonsalvas added the bug Something isn't working label Jan 17, 2023
@jonsalvas jonsalvas changed the title Detected a MBean server in the image heap Error: Detected a MBean server in the image heap and quarkus 2.15.3.Final Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants