apache/cassandra · info · RuntimeException
throw new RuntimeException(e)
Error message
throw new RuntimeException(e)
What it means
NodeProbe.getLocationInfoProxy() builds a JMX MBean proxy for org.apache.cassandra.db:type=LocationInfo and wraps MalformedObjectNameException in a RuntimeException. The ObjectName string is a compile-time constant in this code, so this exception should be practically unreachable; it exists only to satisfy the checked exception. Hitting it indicates a JVM/library-level defect, not a user error.
Solutions
- Treat as an internal bug: inspect the chained cause
- Verify no local modification or bytecode instrumentation rewrites the ObjectName string
- Report/fix the code if the constant was edited
Defensive patterns
Strategy: try-catch
Try / catch
try { probe.getLocationInfoProxy(); } catch (RuntimeException e) { throw new IllegalStateException("Unreachable: LocationInfo ObjectName is a constant; see cause", e); } Prevention
- Do not modify hardcoded ObjectName constants in NodeProbe
- Report occurrences as a Cassandra bug with the full chained stack trace
When it happens
Trigger: Calling any NodeProbe method that resolves the LocationInfo proxy (e.g. getEndpointSnitchInfoProxy-style lookups of LocationInfo) — only if the hardcoded ObjectName string were malformed, which it is not.
Common situations: Essentially never in practice; would appear only if the source was modified with an invalid ObjectName or a broken JMX environment interception name construction.
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
- Invalid ObjectName? Please report this as a bug.
- Permissions for JMX resource contains invalid ObjectName
- 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/d8d69880756dc328.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:1307
try
{
return JMX.newMBeanProxy(mbeanServerConn, new ObjectName("org.apache.cassandra.db:type=DynamicEndpointSnitch"), DynamicEndpointSnitchMBean.class);
}
catch (MalformedObjectNameException e)
{
throw new RuntimeException(e);
}
}
public LocationInfoMBean getLocationInfoProxy()
{
try
{
return JMX.newMBeanProxy(mbeanServerConn, new ObjectName("org.apache.cassandra.db:type=LocationInfo"), LocationInfoMBean.class);
}
catch (MalformedObjectNameException e)
{
throw new RuntimeException(e);
}
}
public ColumnFamilyStoreMBean getCfsProxy(String ks, String cf)
{
ColumnFamilyStoreMBean cfsProxy = null;
try
{
String type = cf.contains(".") ? "IndexColumnFamilies" : "ColumnFamilies";
Set<ObjectName> beans = mbeanServerConn.queryNames(
new ObjectName("org.apache.cassandra.db:type=*" + type +",keyspace=" + ks + ",columnfamily=" + cf), null);
if (beans.isEmpty())
throw new MalformedObjectNameException("couldn't find that bean");
assert beans.size() == 1;
for (ObjectName bean : beans)
cfsProxy = JMX.newMBeanProxy(mbeanServerConn, bean, ColumnFamilyStoreMBean.class);
}View on GitHub (pinned to 88fd0f6a0e)