apache/cassandra · error · RuntimeException
Invalid ObjectName? Please report this as a bug.
Error message
Invalid ObjectName? Please report this as a bug.
What it means
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.
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)
Example fix
// before (patched build) public static final String MBEAN_NAME = "org.apache.cassandra.db:type=Guardrails!"; // after public static final String MBEAN_NAME = "org.apache.cassandra.db:type=Guardrails";
Defensive patterns
Strategy: try-catch
Validate before calling
String name = Guardrails.MBEAN_NAME;
if (name == null || !name.matches("[A-Za-z0-9_.-]+:.+"))
throw new IllegalStateException("Guardrails MBEAN_NAME not a valid ObjectName: " + name); Try / catch
try { probe.connect(); } catch (RuntimeException e) {
if (e.getCause() instanceof MalformedObjectNameException)
throw new IllegalStateException("Corrupt Cassandra build: invalid MBean ObjectName", e);
throw e;
} Prevention
- Use stock, unmodified Cassandra releases
- Never edit Guardrails.MBEAN_NAME or similar ObjectName constants
- Avoid mixed cassandra jar versions on the classpath
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Invalid keyspace or table name
- Permissions for JMX resource contains invalid ObjectName
- throw new RuntimeException(e)
- Aborted garbage collection for at least one table in…
- Aborted garbage collection for at least one table, check…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/ebdf9909e8b0e7d7.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:357
name = new ObjectName(CIDRGroupsMappingManager.MBEAN_NAME);
cmbProxy = JMX.newMBeanProxy(mbeanServerConn, name, CIDRGroupsMappingManagerMBean.class);
name = new ObjectName(CIDRFilteringMetricsTable.MBEAN_NAME);
cfmProxy = JMX.newMBeanProxy(mbeanServerConn, name, CIDRFilteringMetricsTableMBean.class);
name = new ObjectName(AutoRepairService.MBEAN_NAME);
autoRepairProxy = JMX.newMBeanProxy(mbeanServerConn, name, AutoRepairServiceMBean.class);
name = new ObjectName(AsyncProfilerService.MBEAN_NAME);
asyncProfilerProxy = JMX.newMBeanProxy(mbeanServerConn, name, AsyncProfilerMBean.class);
name = new ObjectName(Guardrails.MBEAN_NAME);
grProxy = JMX.newMBeanProxy(mbeanServerConn, name, GuardrailsMBean.class);
}
catch (MalformedObjectNameException e)
{
throw new RuntimeException(
"Invalid ObjectName? Please report this as a bug.", e);
}
memProxy = ManagementFactory.newPlatformMXBeanProxy(mbeanServerConn,
ManagementFactory.MEMORY_MXBEAN_NAME, MemoryMXBean.class);
runtimeProxy = ManagementFactory.newPlatformMXBeanProxy(
mbeanServerConn, ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class);
}
private RMIClientSocketFactory getRMIClientSocketFactory()
{
if (SSL_ENABLE.getBoolean())
return new SslRMIClientSocketFactory();
else
return RMISocketFactory.getDefaultSocketFactory();
}
public void close() throws IOExceptionView on GitHub (pinned to 88fd0f6a0e)