pentaho/pentaho-kettle · error · KettleFileException
: Unknown storage type " + getStorageType()
Error message
: Unknown storage type " + getStorageType()
What it means
Thrown by ValueMetaTimestamp.writeData when the object's storage type is not one of the writable types, producing an unknown-storage-type KettleFileException during binary row serialization to a DataOutputStream.
Solutions
- Fix storage type with setStorageType before writing
- Convert the object to normal storage (convertToNormalStorageTypes) prior to writeData
- Regenerate the transformation metadata in the current PDI version
Example fix
// before // meta has invalid storageType meta.writeData(outputStream, object); // after meta.setStorageType(ValueMetaInterface.STORAGE_TYPE_NORMAL); meta.writeData(outputStream, object);
Defensive patterns
Strategy: validation
Validate before calling
if (meta.getStorageType() < ValueMetaInterface.STORAGE_TYPE_NORMAL || meta.getStorageType() > ValueMetaInterface.STORAGE_TYPE_INDEXED) {
meta.setStorageType(ValueMetaInterface.STORAGE_TYPE_NORMAL);
} Type guard
boolean writableStorageType(ValueMetaInterface vm) {
return vm.getStorageType() == ValueMetaInterface.STORAGE_TYPE_NORMAL || vm.getStorageType() == ValueMetaInterface.STORAGE_TYPE_BINARY_STRING || vm.getStorageType() == ValueMetaInterface.STORAGE_TYPE_INDEXED;
} Try / catch
try {
meta.writeData(outputStream, object);
} catch (KettleFileException e) {
logError("Write failed: " + e.getMessage());
meta.setStorageType(ValueMetaInterface.STORAGE_TYPE_NORMAL);
meta.writeData(outputStream, meta.getNormalStorageType(object));
} Prevention
- Normalize storage types before binary output
- Use the same PDI version across master and slaves
- Avoid custom code that mutates storageType on shared row metadata
When it happens
Trigger: Writing a row to a Kettle split file/socket stream where the timestamp meta has an undefined storage type (same corruption path as error 546) — the switch's default branch fires.
Common situations: Version-mismatched metadata in clustered/trans-morri? (clustered runs), hand-constructed ValueMeta objects used in custom file output steps.
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 write value timestamp data to output stream
- : Unknown storage type " + getStorageType()
- CubeInputMeta.Exception.UnableToLoadStepInfo
- Error loading transformation step from XML
- Error loading transformation step from XML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/d7b8f7278698165b.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaTimestamp.java:606
outputStream.writeInt( timestamp.getNanos() );
break;
case STORAGE_TYPE_BINARY_STRING:
// Handle binary string content -- only when not NULL
// In this case, we opt not to convert anything at all for speed.
// That way, we can save on CPU power.
// Since the streams can be compressed, volume shouldn't be an issue
// at all.
//
writeBinaryString( outputStream, (byte[]) object );
break;
case STORAGE_TYPE_INDEXED:
writeInteger( outputStream, (Integer) object ); // just an index
break;
default:
throw new KettleFileException( toString() + " : Unknown storage type " + getStorageType() );
}
}
} catch ( ClassCastException e ) {
throw new RuntimeException( toString() + " : There was a data type error: the data type of "
+ object.getClass().getName() + " object [" + object + "] does not correspond to value meta ["
+ toStringMeta() + "]" );
} catch ( IOException e ) {
throw new KettleFileException( toString() + " : Unable to write value timestamp data to output stream", e );
} catch ( KettleValueException e ) {
throw new RuntimeException( toString() + " : There was a data type error: the data type of "
+ object.getClass().getName() + " object [" + object + "] does not correspond to value meta ["
+ toStringMeta() + "]" );
}
}
@Override
public Object readData( DataInputStream inputStream ) throws KettleFileException, KettleEOFException,
SocketTimeoutException {View on GitHub (pinned to f3058517a1)