apache/cassandra · error · ConfigurationException

Invalid value for system property: expected floating point v

Error message

Invalid value for system property: expected floating point value but got '%s'

What it means

The DOUBLE_CONVERTER in CassandraRelevantProperties parses a system property as a Java double. If Double.parseDouble fails because the value is not a valid floating point literal, a ConfigurationException with this message is thrown, echoing the bad value.

Source

Thrown at src/java/org/apache/cassandra/config/CassandraRelevantProperties.java:1150

        {
            return FBUtilities.parseHumanReadableBytes(value);
        }
        catch (ConfigurationException e)
        {
            throw new ConfigurationException(String.format("Invalid value for system property: " +
                                                           "expected size in bytes with unit but got '%s'\n%s", value, e));
        }
    };

    private static final PropertyConverter<Double> DOUBLE_CONVERTER = value ->
    {
        try
        {
            return Double.parseDouble(value);
        }
        catch (NumberFormatException e)
        {
            throw new ConfigurationException(String.format("Invalid value for system property: " +
                                                           "expected floating point value but got '%s'", value));
        }
    };

    /**
     * @return whether a system property is present or not.
     */
    public boolean isPresent()
    {
        return System.getProperties().containsKey(key);
    }
}

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Set the property to a plain decimal number using a dot as separator, e.g. 0.5 or 1.0
  2. Check for empty values caused by shell variable expansion in cassandra-env.sh or jvm options
  3. Print the property at startup (System.getProperty) or inspect the ConfigurationException message to see the exact offending value
  4. Remove any units, percent signs, or thousands separators from the value

Example fix

// before
-Dcassandra.some_double_ratio=0,75
// after
-Dcassandra.some_double_ratio=0.75
Defensive patterns

Strategy: validation

Validate before calling

String v = System.getProperty("my.double.prop", "");
if (!v.matches("[+-]?\\d+(\\.\\d+)?([eE][+-]?\\d+)?"))
    throw new IllegalArgumentException("Property my.double.prop must be a decimal number, got: " + v);

Try / catch

try {
    double d = Double.parseDouble(value);
} catch (NumberFormatException e) {
    logger.error("Non-numeric double property: " + value);
    d = DEFAULT;
}

Prevention

When it happens

Trigger: Assigning a non-numeric value to a system property whose converter is DOUBLE_CONVERTER, e.g. -Dsome.ratio=high or a value with a comma like 0,5 instead of 0.5.

Common situations: Locale mistakes (comma decimal separator), empty values in options files, accidentally passing a property name where a number belongs, YAML/env interpolation producing empty or textual output.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/92b77830c6630ce2. Report an issue: GitHub.