pentaho/pentaho-kettle · error · KettleFileException
: Unknown storage type
Error message
: Unknown storage type
What it means
ValueMetaTimestamp.readData() deserializes a value from an input stream and switches on the storage type read from the wire. If the storage-type code is not one of the known STORAGE_TYPE_* constants, it throws KettleFileException 'Unknown storage type'. This indicates corrupt or incompatible binary data.
Solutions
- Regenerate the corrupted serialized data with the same Pentaho version that reads it
- Verify stream alignment: a desynchronization upstream can misread the storage-type byte
- Align reader/writer Pentaho versions; do not stream rows between different Kettle releases
- Inspect getStorageType() of the source ValueMeta before serializing
Defensive patterns
Strategy: try-catch
Validate before calling
if (storageType < 0 || storageType > STORAGE_TYPE_SORTABLE) { throw new KettleFileException("Storage type out of range: " + storageType); } Try / catch
try {
value = valueMeta.readData(inputStream);
} catch (KettleFileException e) {
LOG.error("Corrupt or incompatible row stream: " + e.getMessage());
throw new IOException("Aborting read", e);
} Prevention
- Do not stream serialized rows between different Pentaho/Kettle versions
- Validate file integrity (checksum) before deserializing
- Regenerate binary artifacts after upgrading Kettle
When it happens
Trigger: Reading a serialized row whose storage-type byte is negative or outside the defined range (STORAGE_TYPE_NORMAL/INDEXED/BINARY_STRING/SORTABLE); deserializing files written by a different Kettle version with new storage types.
Common situations: Kettle repository/kitchen files moved across Pentaho versions; truncated or corrupted serialized row streams; custom serialization bugs writing garbage before readData.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unable to read cache entry from data input stream
- Unable to read step info from XML node
- Unexpected error trying to decode object.
- AbortMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepo…
- AddSequenceMeta.Exception.ErrorLoadingStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/8f650a9980fb31ae.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaTimestamp.java:647
}
switch ( storageType ) {
case STORAGE_TYPE_NORMAL:
// Handle Content -- only when not NULL
long time = inputStream.readLong();
int nanos = inputStream.readInt();
Timestamp timestamp = new Timestamp( time );
timestamp.setNanos( nanos );
return timestamp;
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 timestamp data from input stream", e );
}
}
@Override
public synchronized SimpleDateFormat getDateFormat() {
return getDateFormat( getType() );
}
private synchronized SimpleDateFormat getDateFormat( int valueMetaType ) {
if ( conversionMetadata != null ) {
return new SimpleTimestampFormat( conversionMetadata.getDateFormat().toPattern() );View on GitHub (pinned to f3058517a1)