pentaho/pentaho-kettle · error · KettleFileException
: Unable to de-serialize data of type " + getType()
Error message
: Unable to de-serialize data of type " + getType()
What it means
KettleFileException thrown by ValueMetaBase.readData when the serialized storage type is STORAGE_TYPE_NORMAL but getType() is not one of the types the reader understands. The reader's type switch hit its default branch during de-serialization.
Solutions
- Run the same Kettle/Pentaho version on both writer and reader sides
- Inspect getType() on the target ValueMeta and map unsupported types to supported ones before transfer
- Regenerate or repair the metadata file if the type constant is corrupt
Example fix
// before
Object v = valueMeta.readData(inputStream); // writer used TYPE_TIMESTAMP, reader is older
// after
if (valueMeta.getType() == ValueMetaInterface.TYPE_TIMESTAMP) {
valueMeta = valueMeta.clone(); valueMeta.setType(ValueMetaInterface.TYPE_DATE);
}
Object v = valueMeta.readData(inputStream); Defensive patterns
Strategy: try-catch
Validate before calling
// Reject unreadable types before reading:
static void assertReadableType(ValueMetaInterface vmi) throws KettleFileException {
switch (vmi.getType()) {
case ValueMetaInterface.TYPE_STRING:
case ValueMetaInterface.TYPE_NUMBER:
case ValueMetaInterface.TYPE_INTEGER:
case ValueMetaInterface.TYPE_DATE:
case ValueMetaInterface.TYPE_BOOLEAN:
case ValueMetaInterface.TYPE_BIGNUMBER:
case ValueMetaInterface.TYPE_BINARY:
case ValueMetaInterface.TYPE_INET:
return;
default:
throw new KettleFileException("Type " + vmi.getType() + " on '" + vmi.getName() + "' cannot be de-serialized by this Kettle version");
}
} Try / catch
try {
Object v = valueMeta.readData(in);
} catch (KettleFileException e) {
if (String.valueOf(e.getMessage()).contains("Unable to de-serialize")) {
LOG.error("Reader Kettle version does not support type " + valueMeta.getType());
// upgrade Kettle or remap the field type and re-run
} else { throw e; }
} Prevention
- Run identical Kettle versions on all readers/writers of serialized rows
- Test cross-version round-trips (write with vN, read with vN-1) in CI before upgrades
- Remap newer types (TIMESTAMP) to legacy types when exchanging data with older tooling
When it happens
Trigger: readData() called on a stream whose next value was written by a Kettle version supporting a type (e.g., TYPE_TIMESTAMP, TYPE_INET on mismatched versions, TYPE_SERIALIZABLE) that the current reader does not handle for that storage type.
Common situations: Version skew between cluster nodes or between a writer tool and reader tool; corrupt metadata where type was set to an unsupported constant; reading Kettle-serialized files produced by newer Pentaho releases.
Related errors
- ColumnExistsMeta.Exception.UnableToReadStepInfo
- CreditCardValidatorMeta.Exception.UnableToReadStepInfo
- CubeInputMeta.Exception.UnableToReadMetaData
- GPLoadDataOutput.Exception.TypeNotSupported
- ScriptMeta.Exception.UnableToLoadStepInfoFromXML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/2bdf415980b7db56.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:2823
switch ( getType() ) {
case TYPE_STRING:
return readString( inputStream );
case TYPE_NUMBER:
return readNumber( inputStream );
case TYPE_INTEGER:
return readInteger( inputStream );
case TYPE_DATE:
return readDate( inputStream );
case TYPE_BIGNUMBER:
return readBigNumber( inputStream );
case TYPE_BOOLEAN:
return readBoolean( inputStream );
case TYPE_BINARY:
return readBinary( inputStream );
case TYPE_INET:
return InetAddress.getByAddress( readBinary( inputStream ) );
default:
throw new KettleFileException( toString() + " : Unable to de-serialize data of type " + getType() );
}
case STORAGE_TYPE_BINARY_STRING:
return readBinaryString( inputStream );
case STORAGE_TYPE_INDEXED:
return readSmallInteger( inputStream ); // just an index: 4-bytes should
// be enough.
default:
throw new KettleFileException( toString() + " : Unknown storage type " + getStorageType() );
}
} catch ( EOFException e ) {
throw new KettleEOFException( e );
} catch ( SocketTimeoutException e ) {
throw e;
} catch ( IOException e ) {
throw new KettleFileException( toString() + " : Unable to read value data from input stream", e );View on GitHub (pinned to f3058517a1)