Skip to content

javax.management.JMX.createProxy is not implemented in native mode #46506

@jamesnetherton

Description

@jamesnetherton

Describe the bug

In the Quarkus Core there is this substitution for javax.management.JMX.createProxy:

https://github.com/quarkusio/quarkus/blob/1ba5ca13b724079df3e63b6c14df212a4b5a5542/core/runtime/src/main/java/io/quarkus/runtime/graal/Target_javax_management_JMX.java

I wonder if this could be removed or be made conditional based on whether native JMX support is enabled?

Camel has a comprehensive JMX based management layer and there's a few code paths that trigger activation of javax.management.JMX. Which leads to runtime exceptions like this:

java.lang.IllegalStateException: Not Implemented in native mode
	at [email protected]/javax.management.JMX.createProxy(JMX.java:19)
	at [email protected]/javax.management.JMX.newMBeanProxy(JMX.java:216)
	at [email protected]/javax.management.MBeanServerInvocationHandler.newProxyInstance(MBeanServerInvocationHandler.java:240)
	at org.apache.camel.management.DefaultManagementAgent.newProxyClient(DefaultManagementAgent.java:396)
	at org.apache.camel.management.mbean.ManagedCamelContext.dumpRoutesStatsAsXml(ManagedCamelContext.java:646)

I tested with removing the substitution and my previously failing JMX operation invocations started working fine.

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Mandrel or GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions