pentaho/pentaho-kettle · error · KettleException
ExcelInput.Exception.InvalidTypeBoolean
ExcelInput.Exception.InvalidTypeBoolean
Error message
ExcelInput.Exception.InvalidTypeBoolean
What it means
ExcelInput.checkType() throws this KettleException when an Excel cell contains a BOOLEAN but the corresponding field's ValueMeta has an incompatible data type. Only String, None (unspecified), or Boolean target types can receive a boolean cell; anything else aborts row processing.
Solutions
- Open the Excel Input step and change the field's Type to String, Boolean, or leave it unspecified
- If the field must stay numeric, fix the source sheet so the column no longer contains TRUE/FALSE values
- Add a conversion step (e.g. 'Value Mapper' or 'If') downstream after reading the boolean as String/Boolean
- Re-run 'Preview rows' in the step dialog to confirm the detected cell type matches field types
Example fix
// before (field meta) field: columnName=isActive, type=Integer // after field: columnName=isActive, type=Boolean // or String, then convert downstream
Defensive patterns
Strategy: validation
Validate before calling
int cellType = cell.getType(); // KCellType.BOOLEAN etc.
int fieldType = v.getType();
boolean ok = cellType == KCellType.BOOLEAN
&& ( fieldType == ValueMetaInterface.TYPE_STRING
|| fieldType == ValueMetaInterface.TYPE_NONE
|| fieldType == ValueMetaInterface.TYPE_BOOLEAN );
if ( !ok ) { /* fix field type in step metadata first */ } Type guard
boolean acceptsBooleanCell( ValueMetaInterface v ) {
int t = v.getType();
return t == ValueMetaInterface.TYPE_STRING
|| t == ValueMetaInterface.TYPE_NONE
|| t == ValueMetaInterface.TYPE_BOOLEAN;
} Try / catch
try {
row = excelInput.fillRow( cells, ... );
} catch ( KettleException e ) {
if ( e.getMessage().contains( "InvalidTypeBoolean" ) ) {
// coerce field to String/Boolean in step metadata and rerun
}
} Prevention
- Align Excel Input field types with the actual sheet cell types via Preview rows
- Avoid editing field types without re-checking source sheet contents
- Handle TRUE/FALSE columns as Boolean or String, converting downstream
When it happens
Trigger: fillRow() processing a boolean cell whose mapped field is defined in the step metadata as Integer, Number, Date, BigNumber, etc. — the declared field type in the Excel Input step does not accept booleans.
Common situations: Excel column contents changed after the step metadata was defined (TRUE/FALSE now appears where numbers used to be), or the field type was edited to Number while the sheet still emits TRUE/FALSE.
Understand the failure class
Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.
Related errors
- ExcelInput.Exception.InvalidTypeNumber
- ExcelInput.Exception.InvalidTypeDate
- ExcelInput.Exception.InvalidTypeLabel
- GPLoadDataOutput.Exception.TypeNotSupported
- MondrianInputErrorUnhandledType
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/89657cb4673f3377.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/ExcelInput.java:324
}
// Add RootUri
if ( !Utils.isEmpty( meta.getRootUriField() ) ) {
r[rowIndex] = data.rootUriName;
rowIndex++;
}
return r;
}
private void checkType( KCell cell, ValueMetaInterface v ) throws KettleException {
if ( !meta.isStrictTypes() ) {
return;
}
switch ( cell.getType() ) {
case BOOLEAN:
if ( !( v.getType() == ValueMetaInterface.TYPE_STRING || v.getType() == ValueMetaInterface.TYPE_NONE || v
.getType() == ValueMetaInterface.TYPE_BOOLEAN ) ) {
throw new KettleException( BaseMessages.getString( PKG, "ExcelInput.Exception.InvalidTypeBoolean", v
.getTypeDesc() ) );
}
break;
case DATE:
if ( !( v.getType() == ValueMetaInterface.TYPE_STRING || v.getType() == ValueMetaInterface.TYPE_NONE || v
.getType() == ValueMetaInterface.TYPE_DATE ) ) {
throw new KettleException( BaseMessages.getString( PKG, "ExcelInput.Exception.InvalidTypeDate", cell
.getContents(), v.getTypeDesc() ) );
}
break;
case LABEL:
if ( v.getType() == ValueMetaInterface.TYPE_BOOLEAN
|| v.getType() == ValueMetaInterface.TYPE_DATE || v.getType() == ValueMetaInterface.TYPE_INTEGER
|| v.getType() == ValueMetaInterface.TYPE_NUMBER ) {
throw new KettleException( BaseMessages.getString( PKG, "ExcelInput.Exception.InvalidTypeLabel", cell
.getContents(), v.getTypeDesc() ) );View on GitHub (pinned to f3058517a1)