pentaho/pentaho-kettle · error · KettleException
AvroInput.Error.NoFieldPathsDefined
AvroInput.Error.NoFieldPathsDefined
Error message
AvroInput.Error.NoFieldPathsDefined
What it means
AvroNestedReader.init requires at least one field path (the fields to read from the Avro records). If m_normalFields is null or empty, no output columns would be produced, so init throws a KettleException with the localized message 'AvroInput.Error.NoFieldPathsDefined'.
Solutions
- Add field path mappings in the Avro Input step dialog (select fields from the schema)
- Verify the step's field list survived save/load (re-open and re-save the step)
- If building metadata in code, populate fields before init
Example fix
// before
meta.setFieldPaths(new String[0]); // no fields
// after
meta.setFieldPaths(new String[]{ "$.id", "$.name" }); Defensive patterns
Strategy: validation
Validate before calling
if (meta.getFields() == null || meta.getFields().isEmpty()) {
throw new KettleException("Avro Input step must define at least one field path before running");
} Try / catch
try {
nestedReader.init();
} catch (KettleException e) {
logError("No field paths configured: " + e.getMessage());
setErrors(1);
} Prevention
- Fill the fields grid in the Avro Input dialog before saving
- Use the schema preview to select paths instead of typing them manually
- Re-open saved transformations to confirm field mappings persisted
When it happens
Trigger: Calling init() when no Avro input fields / field paths were configured on the step metadata.
Common situations: Running a transformation where the Avro Input step has an empty 'fields' mapping list; fields lost after XML/repository load failure; programmatic StepMeta setup without addField calls.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- AvroInput.Error.MutipleDifferentExpansions
- AvroInput.Error.PathContainsMultipleExpansions
- No data location defined
- AccessOutputMeta.Exception.FileDoesNotExist
- AccessOutputMeta.Exception.TableDoesNotExist
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/d4f7a9b7751914d1.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/avro-format/core/src/main/java/org/pentaho/di/trans/steps/avro/input/AvroNestedReader.java:213
protected AvroToPdiConverter m_avroToPdiConverter;
/**
* Factory for obtaining a decoder
*/
protected DecoderFactory m_factory;
//protected static Class<?> PKG = AvroInputMeta.class;
protected static Class<?> PKG = AvroNestedReader.class;
protected void init() throws KettleException {
if ( m_schemaToUse != null ) {
m_avroToPdiConverter = new AvroToPdiConverter( m_schemaToUse );
initTopLevelStructure( m_schemaToUse, true );
}
if ( m_normalFields == null || m_normalFields.size() == 0 ) {
throw new KettleException( BaseMessages.getString( PKG, "AvroInput.Error.NoFieldPathsDefined" ) );
}
m_expansionHandler = checkFieldPaths( m_normalFields, m_outputRowMeta );
int killmeIndex = 0;
for ( AvroInputField f : m_normalFields ) {
//bypass this for now: int outputIndex = m_outputRowMeta.indexOfValue( f.getPentahoFieldName() );
int outputIndex = killmeIndex++;
fieldInit( f, outputIndex );
}
if ( m_expansionHandler != null ) {
m_expansionHandler.init();
}
m_factory = new DecoderFactory();
}
/**View on GitHub (pinned to f3058517a1)