{"record":{"id":"ebdf9909e8b0e7d7","repo":"apache/cassandra","slug":"invalid-objectname-please-report-this-as-a-bug","errorCode":null,"errorMessage":"Invalid ObjectName? Please report this as a bug.","messagePattern":"Invalid ObjectName\\? Please report this as a bug\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/NodeProbe.java","lineNumber":357,"sourceCode":"\n            name = new ObjectName(CIDRGroupsMappingManager.MBEAN_NAME);\n            cmbProxy = JMX.newMBeanProxy(mbeanServerConn, name, CIDRGroupsMappingManagerMBean.class);\n\n            name = new ObjectName(CIDRFilteringMetricsTable.MBEAN_NAME);\n            cfmProxy = JMX.newMBeanProxy(mbeanServerConn, name, CIDRFilteringMetricsTableMBean.class);\n\n            name = new ObjectName(AutoRepairService.MBEAN_NAME);\n            autoRepairProxy = JMX.newMBeanProxy(mbeanServerConn, name, AutoRepairServiceMBean.class);\n\n            name = new ObjectName(AsyncProfilerService.MBEAN_NAME);\n            asyncProfilerProxy = JMX.newMBeanProxy(mbeanServerConn, name, AsyncProfilerMBean.class);\n\n            name = new ObjectName(Guardrails.MBEAN_NAME);\n            grProxy = JMX.newMBeanProxy(mbeanServerConn, name, GuardrailsMBean.class);\n        }\n        catch (MalformedObjectNameException e)\n        {\n            throw new RuntimeException(\n                    \"Invalid ObjectName? Please report this as a bug.\", e);\n        }\n\n        memProxy = ManagementFactory.newPlatformMXBeanProxy(mbeanServerConn,\n                ManagementFactory.MEMORY_MXBEAN_NAME, MemoryMXBean.class);\n        runtimeProxy = ManagementFactory.newPlatformMXBeanProxy(\n                mbeanServerConn, ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class);\n    }\n\n    private RMIClientSocketFactory getRMIClientSocketFactory()\n    {\n        if (SSL_ENABLE.getBoolean())\n            return new SslRMIClientSocketFactory();\n        else\n            return RMISocketFactory.getDefaultSocketFactory();\n    }\n\n    public void close() throws IOException","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/NodeProbe.java#L339-L375","documentation":"NodeProbe connects to the Cassandra node over JMX and builds proxies for MBeans including Guardrails. The Guardrails MBean ObjectName is a compile-time constant, so MalformedObjectNameException is impossible in practice; this RuntimeException wraps it purely as an internal-invariant assertion, and the message asks the user to report it as a bug.","triggerScenarios":"Constructing NodeProbe (or calling connect) when new ObjectName(Guardrails.MBEAN_NAME) throws MalformedObjectNameException — i.e. the Guardrails.MBEAN_NAME constant in the running Cassandra version is not a valid JMX ObjectName.","commonSituations":"Essentially only custom/patched builds or classpath mixing where Guardrails.MBEAN_NAME was edited to an illegal string (illegal characters like ':', '=', or empty domain). Standard releases never throw this.","solutions":["Report the issue to the Cassandra project with your exact version and any patches applied","Check whether a modified cassandra-all jar or patched Guardrails class is on the classpath and restore the stock ObjectName constant","Verify only one version of cassandra-all is on the classpath (no mixed-version jars)"],"exampleFix":"// before (patched build)\npublic static final String MBEAN_NAME = \"org.apache.cassandra.db:type=Guardrails!\";\n// after\npublic static final String MBEAN_NAME = \"org.apache.cassandra.db:type=Guardrails\";","handlingStrategy":"try-catch","validationCode":"String name = Guardrails.MBEAN_NAME;\nif (name == null || !name.matches(\"[A-Za-z0-9_.-]+:.+\"))\n    throw new IllegalStateException(\"Guardrails MBEAN_NAME not a valid ObjectName: \" + name);","typeGuard":null,"tryCatchPattern":"try { probe.connect(); } catch (RuntimeException e) {\n    if (e.getCause() instanceof MalformedObjectNameException)\n        throw new IllegalStateException(\"Corrupt Cassandra build: invalid MBean ObjectName\", e);\n    throw e;\n}","preventionTips":["Use stock, unmodified Cassandra releases","Never edit Guardrails.MBEAN_NAME or similar ObjectName constants","Avoid mixed cassandra jar versions on the classpath"],"tags":["jmx","internal-error","objectname"],"backgroundTag":"internal-invariant-violation","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}