{"record":{"id":"d7b8f7278698165b","repo":"pentaho/pentaho-kettle","slug":"unknown-storage-type-getstoragetype-valuemetatimestamp","errorCode":null,"errorMessage":" : Unknown storage type \" + getStorageType()","messagePattern":" : Unknown storage type \" \\+ getStorageType\\(\\)","errorType":"exception","errorClass":"KettleFileException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/ValueMetaTimestamp.java","lineNumber":606,"sourceCode":"            outputStream.writeInt( timestamp.getNanos() );\n            break;\n\n          case STORAGE_TYPE_BINARY_STRING:\n            // Handle binary string content -- only when not NULL\n            // In this case, we opt not to convert anything at all for speed.\n            // That way, we can save on CPU power.\n            // Since the streams can be compressed, volume shouldn't be an issue\n            // at all.\n            //\n            writeBinaryString( outputStream, (byte[]) object );\n            break;\n\n          case STORAGE_TYPE_INDEXED:\n            writeInteger( outputStream, (Integer) object ); // just an index\n            break;\n\n          default:\n            throw new KettleFileException( toString() + \" : Unknown storage type \" + getStorageType() );\n        }\n      }\n    } catch ( ClassCastException e ) {\n      throw new RuntimeException( toString() + \" : There was a data type error: the data type of \"\n        + object.getClass().getName() + \" object [\" + object + \"] does not correspond to value meta [\"\n        + toStringMeta() + \"]\" );\n    } catch ( IOException e ) {\n      throw new KettleFileException( toString() + \" : Unable to write value timestamp data to output stream\", e );\n    } catch ( KettleValueException e ) {\n      throw new RuntimeException( toString() + \" : There was a data type error: the data type of \"\n        + object.getClass().getName() + \" object [\" + object + \"] does not correspond to value meta [\"\n        + toStringMeta() + \"]\" );\n    }\n  }\n\n  @Override\n  public Object readData( DataInputStream inputStream ) throws KettleFileException, KettleEOFException,\n    SocketTimeoutException {","sourceCodeStart":588,"sourceCodeEnd":624,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/ValueMetaTimestamp.java#L588-L624","documentation":"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.","triggerScenarios":"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.","commonSituations":"Version-mismatched metadata in clustered/trans-morri? (clustered runs), hand-constructed ValueMeta objects used in custom file output steps.","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"],"exampleFix":"// before\n// meta has invalid storageType\nmeta.writeData(outputStream, object);\n// after\nmeta.setStorageType(ValueMetaInterface.STORAGE_TYPE_NORMAL);\nmeta.writeData(outputStream, object);","handlingStrategy":"validation","validationCode":"if (meta.getStorageType() < ValueMetaInterface.STORAGE_TYPE_NORMAL || meta.getStorageType() > ValueMetaInterface.STORAGE_TYPE_INDEXED) {\n  meta.setStorageType(ValueMetaInterface.STORAGE_TYPE_NORMAL);\n}","typeGuard":"boolean writableStorageType(ValueMetaInterface vm) {\n  return vm.getStorageType() == ValueMetaInterface.STORAGE_TYPE_NORMAL || vm.getStorageType() == ValueMetaInterface.STORAGE_TYPE_BINARY_STRING || vm.getStorageType() == ValueMetaInterface.STORAGE_TYPE_INDEXED;\n}","tryCatchPattern":"try {\n  meta.writeData(outputStream, object);\n} catch (KettleFileException e) {\n  logError(\"Write failed: \" + e.getMessage());\n  meta.setStorageType(ValueMetaInterface.STORAGE_TYPE_NORMAL);\n  meta.writeData(outputStream, meta.getNormalStorageType(object));\n}","preventionTips":["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"],"tags":["pdi","file-io","storage-type","serialization"],"backgroundTag":"invalid-enum-value","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}