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

  1. Treat as an internal bug: inspect the chained cause
  2. Verify no local modification or bytecode instrumentation rewrites the ObjectName string
  3. 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

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


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)