pentaho/pentaho-kettle · error · KettleException
JsonReader.Error.ReadUrl.Null
JsonReader.Error.ReadUrl.Null
Error message
JsonReader.Error.ReadUrl.Null
What it means
KettleException with message key JsonReader.Error.ReadUrl.Null thrown by FastJsonReader.readInput() when the Json parse of the input stream returns a null JsonReadContext. It indicates the fastjson-based reader parsed the stream but produced no usable context, so the step cannot extract any JSON data.
Solutions
- Check the input source: confirm the file/URL actually returns non-empty JSON content (curl the URL / cat the file).
- Validate the upstream service or file producer is not emitting empty payloads; add a size check before the step.
- Verify the step's source field (filename or URL field from a previous step) is populated and points to the intended resource.
- If the source legitimately can be empty, guard upstream with a filter step that skips empty files/rows.
Example fix
// before: URL may return empty body
String body = httpClient.get(url); // ""
// after: guard before feeding the step
if (body == null || body.trim().isEmpty()) { throw new IllegalStateException("Empty JSON from " + url); }
new JSONObject(body); // also validates it parses Defensive patterns
Strategy: validation
Validate before calling
// ensure the source yields non-empty content before the JSON Input step
String body = fetch(urlOrFile);
if (body == null || body.trim().isEmpty()) throw new IllegalStateException("Empty JSON payload from source"); Try / catch
try { runTransformation(); }
catch (KettleException e) {
if (e.getMessage() != null && e.getMessage().contains("ReadUrl.Null")) { alert("Empty JSON source"); }
else throw e;
} Prevention
- Check file size / HTTP body length upstream and skip empty sources with a filter step.
- Confirm the filename/URL field from the previous step is populated.
- Monitor upstream producers so silent empty payloads are caught early.
- Make the previous step fail loudly rather than passing empty rows downstream.
When it happens
Trigger: parse -> readInput: getParseContext().parse(is, JSON_CHARSET) returns null — empty or whitespace-only input stream, or a stream whose content fastjson cannot build a context from (e.g. empty body fetched from a URL).
Common situations: URL source returns 200 with empty body; source file exists but is zero bytes; upstream service returns blank response during maintenance windows; wrong field chosen so the fetched resource has no content.
Related errors
- ElasticSearchBulk.Error.NoJsonFieldFormat
- JsonInput.Error.BadStructure
- JsonInput.Log.NoField
- JsonInputException(e)
- JsonInputException(ke)
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/19c7371ef20c5ac3.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/json/core/src/main/java/org/pentaho/di/trans/steps/jsoninput/reader/FastJsonReader.java:122
return defaultPathLeafToNull;
}
Configuration getJsonConfiguration() {
return jsonConfiguration;
}
private ParseContext getParseContext() {
return JsonPath.using( jsonConfiguration );
}
private ReadContext getReadContext() {
return jsonReadContext;
}
protected void readInput( InputStream is ) throws KettleException {
jsonReadContext = getParseContext().parse( is, JSON_CHARSET );
if ( jsonReadContext == null ) {
throw new KettleException( BaseMessages.getString( PKG, "JsonReader.Error.ReadUrl.Null" ) );
}
}
public boolean isIgnoreMissingPath() {
return this.ignoreMissingPath;
}
public void setInputFields( JsonInputField[] inputFields ) {
if ( null != inputFields ) {
this.inputFields = inputFields;
compiledJsonPaths = new JsonPath[ inputFields.length ];
int i = 0;
for ( JsonInputField inputField : inputFields ) {
if ( System.getProperty( Const.KETTLE_COMPATIBILITY_JSON_INPUT_LEGACY_MODE, "N" ).equals( "Y" ) ) {
compiledJsonPaths[ i++ ] = JsonPath.compile( step.environmentSubstitute( inputField.getPath(), false ).trim() );
} else {
compiledJsonPaths[ i++ ] = JsonPath.compile( step.environmentSubstitute( inputField.getPath(), true ) );View on GitHub (pinned to f3058517a1)