Skip to content

Instantly share code, notes, and snippets.

@gunnarmorling
Created March 15, 2025 10:46
Show Gist options
  • Save gunnarmorling/264bfde458c71152336be6faab115563 to your computer and use it in GitHub Desktop.
Save gunnarmorling/264bfde458c71152336be6faab115563 to your computer and use it in GitHub Desktop.
export EXTRA_ARGS="-XX:AOTMode=create -XX:AOTConfiguration=app.aotconf -XX:AOTCache=app.aot"
bin/kafka-server-start.sh config/kraft/reconfig-server.properties
java.lang.IllegalArgumentException: javax.management.NotCompliantMBeanException: com.sun.management.UnixOperatingSystemMXBean: During -Xshare:dump, module system cannot be modified after it's initialized
at java.management/javax.management.StandardMBean.<init>(StandardMBean.java:270)
at java.management/java.lang.management.ManagementFactory.addMXBean(ManagementFactory.java:882)
at java.management/java.lang.management.ManagementFactory.lambda$getPlatformMBeanServer$1(ManagementFactory.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:186)
at java.base/java.util.Collections$2.tryAdvance(Collections.java:5075)
at java.base/java.util.Collections$2.forEachRemaining(Collections.java:5083)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:807)
at java.base/java.util.stream.ReferencePipeline$7$1FlatMap.accept(ReferencePipeline.java:294)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:197)
at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1788)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:570)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:153)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:176)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:636)
at java.management/java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:474)
at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap.startLocalConnectorServer(ConnectorBootstrap.java:542)
at jdk.management.agent/jdk.internal.agent.Agent.startLocalManagementAgent(Agent.java:316)
at jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:448)
at jdk.management.agent/jdk.internal.agent.Agent.startAgent(Agent.java:601)
Caused by: javax.management.NotCompliantMBeanException: com.sun.management.UnixOperatingSystemMXBean: During -Xshare:dump, module system cannot be modified after it's initialized
at java.management/com.sun.jmx.mbeanserver.Introspector.throwException(Introspector.java:454)
at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.getPerInterface(MBeanIntrospector.java:197)
at java.management/com.sun.jmx.mbeanserver.MBeanSupport.<init>(MBeanSupport.java:136)
at java.management/com.sun.jmx.mbeanserver.MXBeanSupport.<init>(MXBeanSupport.java:66)
at java.management/javax.management.StandardMBean.construct(StandardMBean.java:174)
at java.management/javax.management.StandardMBean.<init>(StandardMBean.java:268)
... 20 more
Caused by: java.lang.UnsupportedOperationException: During -Xshare:dump, module system cannot be modified after it's initialized
at java.base/java.lang.Module.defineModule0(Native Method)
at java.base/java.lang.Module.<init>(Module.java:141)
at java.base/java.lang.System$1.defineModule(System.java:2036)
at java.base/jdk.internal.module.Modules.defineModule(Modules.java:80)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.lambda$getDynamicModule$0(Proxy.java:832)
at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:329)
at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:205)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.getDynamicModule(Proxy.java:823)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.proxyClassContext(Proxy.java:756)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.<init>(Proxy.java:563)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.<init>(Proxy.java:568)
at java.base/java.lang.reflect.Proxy.lambda$getProxyConstructor$0(Proxy.java:390)
at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:329)
at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:205)
at java.base/java.lang.reflect.Proxy.getProxyConstructor(Proxy.java:388)
at java.base/java.lang.reflect.Proxy.newProxyInstance(Proxy.java:924)
at java.base/sun.reflect.annotation.AnnotationParser.annotationForMap(AnnotationParser.java:297)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:287)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at java.base/sun.reflect.annotation.AnnotationParser.parseSelectAnnotations(AnnotationParser.java:101)
at java.base/sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:139)
at java.base/sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:84)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:261)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:667)
at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:665)
at java.base/java.lang.reflect.Executable.getDeclaredAnnotations(Executable.java:653)
at java.base/java.lang.reflect.Method.getDeclaredAnnotations(Method.java:787)
at java.base/java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:546)
at java.management/com.sun.jmx.mbeanserver.Introspector.descriptorForElement(Introspector.java:385)
at java.management/com.sun.jmx.mbeanserver.ConvertingMethod.getDescriptor(ConvertingMethod.java:55)
at java.management/com.sun.jmx.mbeanserver.MXBeanIntrospector.getMBeanAttributeInfo(MXBeanIntrospector.java:163)
at java.management/com.sun.jmx.mbeanserver.MXBeanIntrospector.getMBeanAttributeInfo(MXBeanIntrospector.java:52)
at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector$MBeanInfoMaker.visitAttribute(MBeanIntrospector.java:321)
at java.management/com.sun.jmx.mbeanserver.MBeanAnalyzer.visit(MBeanAnalyzer.java:67)
at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.makeInterfaceMBeanInfo(MBeanIntrospector.java:215)
at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.getPerInterface(MBeanIntrospector.java:191)
... 24 more
Exception thrown by the agent: java.lang.IllegalArgumentException: javax.management.NotCompliantMBeanException: com.sun.management.UnixOperatingSystemMXBean: During -Xshare:dump, module system cannot be modified after it's initialized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment