pentaho/pentaho-kettle · error · KettleException
Error adding values to row!
Error message
Error adding values to row!
What it means
MailInput.getOneRow() wraps any Exception that occurs while converting the current email's fields into a Kettle output row. It is the generic catch-all of the row-building step: the message was fetched but row data extraction (fields, attachments info, body, rownr handling) failed.
Solutions
- Inspect e.getCause() for the underlying MessagingException/IOException
- Reduce fetched fields (disable body/attachment fields) to isolate the failing field
- Reopen the connection/folder and rerun the transformation
- Check message-specific problems by logging message number/subject before mapping
Example fix
// before
Object[] row = getOneRow(); // generic wrap hides real cause
// after
try {
Object[] row = getOneRow();
} catch ( KettleException e ) {
logError( "Row failed for message " + data.message.getMessageNumber() + ": ", e );
setErrors( 1 );
return null;
} Defensive patterns
Strategy: try-catch
Try / catch
try {
Object[] row = getOneRow();
} catch ( KettleException e ) {
logError( "Error adding values to row: " + e.getCause(), e );
setErrors( 1 );
return null; // stop or skip depending on error handling policy
} Prevention
- Log message number/subject before mapping so failures are attributable
- Limit fetched fields to what the protocol supports
- Set the step's error handling to route bad rows to an error stream
- Test transformations against real mailboxes containing edge-case emails
When it happens
Trigger: Any exception inside the per-message field mapping in getOneRow() (called from outputRowData): e.g. getMessage() content access fails, a field value cannot be converted, attachment retrieval throws.
Common situations: Unreadable message bodies on the server; MIME parsing errors on specific emails; step field configuration referencing content the protocol cannot fetch (e.g. body on POP3 with folder not opened); connection dropped mid-row.
Related errors
- MailConnection.Error.CountingAttachedFiles
- MailConnection.Error.MovingMessages
- MailConnection.Error.WriteMboxFile
- MailInput.Error.ReceivedDateSearchTermEmpty
- MailInput.Error.ReceivedDatesSearchTermEmpty
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/0a854c205b46b194.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/email-messages/impl/src/main/java/org/pentaho/di/trans/steps/mailinput/MailInput.java:236
if ( isDebug() ) {
logDebug( BaseMessages.getString( PKG, "MailInput.Log.FetchingMessage", data.mailConn.getEffectiveMessageNumber( message ) ) );
}
try {
instance.parseToArray( r, message );
} catch ( Exception e ) {
String msg = e.getMessage();
if ( meta.isStopOnError() ) {
throw new KettleException( msg, e );
} else {
logError( msg, e );
}
}
incrementLinesInput();
data.rownr++;
} catch ( Exception e ) {
throw new KettleException( "Error adding values to row!", e );
}
return r;
}
private boolean openNextFolder() {
try {
if ( !meta.isDynamicFolder() ) {
// static folders list
// let's check if we fetched all values in list
if ( data.folderenr >= data.folders.length ) {
// We have fetched all folders
if ( isDetailed() ) {
logDetailed( BaseMessages.getString( PKG, "MailInput.Log.FinishedProcessing" ) );
}
return false;
}
} else {View on GitHub (pinned to f3058517a1)