pentaho/pentaho-kettle · error · IllegalStateException
Value is null
Error message
Value is null
What it means
StringListPluginProperty.assertValueNotNull throws IllegalStateException when the property's underlying value (the string list) is null. List operations like iterator(), isEmpty(), and size() call it because they cannot operate on a null list. The error means the property was created without a list value and has never been initialized.
Solutions
- Initialize the property with a non-null list (e.g. empty ArrayList) at construction time.
- Call setValue(new ArrayList<>()) or the property's setter before reading list operations.
- Check the XML source for a missing value element and provide a default on load.
- Wrap list reads in try-catch (IllegalStateException) when null values are possible.
Example fix
// before
StringListPluginProperty prop = new StringListPluginProperty("key", null);
int n = prop.size();
// after
StringListPluginProperty prop = new StringListPluginProperty("key", new ArrayList<String>());
int n = prop.size(); Defensive patterns
Strategy: validation
Validate before calling
if (prop.getValue() == null) {
prop.setValue(new ArrayList<String>());
}
int n = prop.size(); Type guard
boolean usable = prop != null && prop.getValue() != null;
Try / catch
try {
for (String s : prop) { process(s); }
} catch (IllegalStateException e) {
log.warn("Property list not initialized: " + e.getMessage());
} Prevention
- Always construct with a non-null (possibly empty) list
- Supply defaults when loading from XML with missing value elements
- Call assertValueNotNull() defensively in custom code paths
When it happens
Trigger: Calling iterator(), isEmpty(), size(), or assertValueNotNull() on a StringListPluginProperty constructed with a null value and never assigned a non-null list.
Common situations: Deserializing a property from XML where the value element is missing; constructing the property with a null default; plugin config files from older versions lacking the list element.
Related errors
- A cannot have a nully value.
- AddSequence.Exception.CouldNotFindNextValueForSequence
- API error. ValueMetaInterface can't be null!
- ChangeFileEncoding.Error.SourceFileIsEmpty
- CloneRow.Log.NrClonesIsNull
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/14cdd22ce9d2ac85.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/core/util/StringListPluginProperty.java:212
/**
* @return size
* @throws IllegalStateException
* if value is null.
*/
public int size() throws IllegalStateException {
this.assertValueNotNull();
return this.getValue().size();
}
/**
* Assert state, value not null.
*
* @throws IllegalStateException
* if this.value is null.
*/
public void assertValueNotNull() throws IllegalStateException {
if ( this.getValue() == null ) {
throw new IllegalStateException( "Value is null" );
}
}
}
View on GitHub (pinned to f3058517a1)