apache/cassandra · warning
Unable to parse property…
Error message
Unable to parse property serialization.empty_type_nonempty_writes behavior, falling back to FAIL
What it means
EmptyType parses the system property serialization.empty_type_nonempty_writes to decide how to handle writes of non-empty values to an EmptyType column (see CASSANDRA-15790). If the property value is not one of the NonEmptyWriteBehavior enum names (FAIL, SILENT_DATA_LOSS, LOG_DATA_LOSS), the parser logs a warning and falls back to FAIL.
Solutions
- Set the property to an exact valid enum value: FAIL, SILENT_DATA_LOSS, or LOG_DATA_LOSS
- Check cassandra-env.sh / JVM startup args for typos in -Dserialization.empty_type_nonempty_writes
- Remove the property entirely if the default (FAIL) is desired
- Verify with java -XshowSettings:properties or logs at startup that the value is applied
Example fix
// before JVM_OPTS="$JVM_OPTS -Dserialization.empty_type_nonempty_writes=silent" // after JVM_OPTS="$JVM_OPTS -Dserialization.empty_type_nonempty_writes=SILENT_DATA_LOSS"
Defensive patterns
Strategy: validation
Validate before calling
// validate before launching the JVM
String v = System.getProperty("serialization.empty_type_nonempty_writes");
if (v != null && !Set.of("FAIL","SILENT_DATA_LOSS","LOG_DATA_LOSS").contains(v.trim().toUpperCase()))
throw new IllegalArgumentException("Bad value: " + v); Prevention
- Use exact enum names in JVM properties
- Centralize JVM_OPTS edits and review diffs
- Grep startup logs for this warning after config changes
When it happens
Trigger: Starting the JVM with -Dserialization.empty_type_nonempty_writes=<value> where <value> is misspelled, has unsupported casing beyond trim/uppercase normalization, or is not a valid enum constant.
Common situations: Typo in cassandra-env.sh JVM_OPTS; copying a config flag from documentation of a different version; whitespace or hidden characters in the property value.
Understand the failure class
Background: "is not a valid" / "Invalid ... value" environment variable errors: how libraries validate env vars and what to do when they reject yours — this error's family across 48 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- Invalid overlap inclusion method
- Invalid value for environment variable
- Invalid value for system propery
- Invalid value for 'provide_overlapping_tombstones'…
- Must be one of
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/fcb20cea763fc3f7.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/db/marshal/EmptyType.java:67
{
private enum NonEmptyWriteBehavior { FAIL, LOG_DATA_LOSS, SILENT_DATA_LOSS }
private static final Logger logger = LoggerFactory.getLogger(EmptyType.class);
private static final NoSpamLogger NON_EMPTY_WRITE_LOGGER = NoSpamLogger.getLogger(logger, 1, TimeUnit.MINUTES);
private static final NonEmptyWriteBehavior NON_EMPTY_WRITE_BEHAVIOR = parseNonEmptyWriteBehavior();
private static NonEmptyWriteBehavior parseNonEmptyWriteBehavior()
{
String value = SERIALIZATION_EMPTY_TYPE_NONEMPTY_BEHAVIOR.getString();
if (value == null)
return NonEmptyWriteBehavior.FAIL;
try
{
return NonEmptyWriteBehavior.valueOf(toUpperCaseLocalized(value).trim());
}
catch (Exception e)
{
logger.warn("Unable to parse property " + SERIALIZATION_EMPTY_TYPE_NONEMPTY_BEHAVIOR.getKey() + ", falling back to FAIL", e);
return NonEmptyWriteBehavior.FAIL;
}
}
public static final EmptyType instance = new EmptyType();
private EmptyType() {super(ComparisonType.CUSTOM, 0);} // singleton
@Override
public <V> ByteSource asComparableBytes(ValueAccessor<V> accessor, V data, ByteComparable.Version version)
{
return null;
}
@Override
public <V> V fromComparableBytes(ValueAccessor<V> accessor, ByteSource.Peekable comparableBytes, ByteComparable.Version version)
{
return accessor.empty();View on GitHub (pinned to 88fd0f6a0e)