{"record":{"id":"2bdf415980b7db56","repo":"pentaho/pentaho-kettle","slug":"unable-to-de-serialize-data-of-type-gettype","errorCode":null,"errorMessage":" : Unable to de-serialize data of type \" + getType()","messagePattern":" : Unable to de-serialize data of type \" \\+ getType\\(\\)","errorType":"exception","errorClass":"KettleFileException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java","lineNumber":2823,"sourceCode":"          switch ( getType() ) {\n            case TYPE_STRING:\n              return readString( inputStream );\n            case TYPE_NUMBER:\n              return readNumber( inputStream );\n            case TYPE_INTEGER:\n              return readInteger( inputStream );\n            case TYPE_DATE:\n              return readDate( inputStream );\n            case TYPE_BIGNUMBER:\n              return readBigNumber( inputStream );\n            case TYPE_BOOLEAN:\n              return readBoolean( inputStream );\n            case TYPE_BINARY:\n              return readBinary( inputStream );\n            case TYPE_INET:\n              return InetAddress.getByAddress( readBinary( inputStream ) );\n            default:\n              throw new KettleFileException( toString() + \" : Unable to de-serialize data of type \" + getType() );\n          }\n\n        case STORAGE_TYPE_BINARY_STRING:\n          return readBinaryString( inputStream );\n\n        case STORAGE_TYPE_INDEXED:\n          return readSmallInteger( inputStream ); // just an index: 4-bytes should\n          // be enough.\n\n        default:\n          throw new KettleFileException( toString() + \" : Unknown storage type \" + getStorageType() );\n      }\n    } catch ( EOFException e ) {\n      throw new KettleEOFException( e );\n    } catch ( SocketTimeoutException e ) {\n      throw e;\n    } catch ( IOException e ) {\n      throw new KettleFileException( toString() + \" : Unable to read value data from input stream\", e );","sourceCodeStart":2805,"sourceCodeEnd":2841,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java#L2805-L2841","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nObject v = valueMeta.readData(inputStream); // writer used TYPE_TIMESTAMP, reader is older\n// after\nif (valueMeta.getType() == ValueMetaInterface.TYPE_TIMESTAMP) {\n  valueMeta = valueMeta.clone(); valueMeta.setType(ValueMetaInterface.TYPE_DATE);\n}\nObject v = valueMeta.readData(inputStream);","handlingStrategy":"try-catch","validationCode":"// Reject unreadable types before reading:\nstatic void assertReadableType(ValueMetaInterface vmi) throws KettleFileException {\n  switch (vmi.getType()) {\n    case ValueMetaInterface.TYPE_STRING:\n    case ValueMetaInterface.TYPE_NUMBER:\n    case ValueMetaInterface.TYPE_INTEGER:\n    case ValueMetaInterface.TYPE_DATE:\n    case ValueMetaInterface.TYPE_BOOLEAN:\n    case ValueMetaInterface.TYPE_BIGNUMBER:\n    case ValueMetaInterface.TYPE_BINARY:\n    case ValueMetaInterface.TYPE_INET:\n      return;\n    default:\n      throw new KettleFileException(\"Type \" + vmi.getType() + \" on '\" + vmi.getName() + \"' cannot be de-serialized by this Kettle version\");\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  Object v = valueMeta.readData(in);\n} catch (KettleFileException e) {\n  if (String.valueOf(e.getMessage()).contains(\"Unable to de-serialize\")) {\n    LOG.error(\"Reader Kettle version does not support type \" + valueMeta.getType());\n    // upgrade Kettle or remap the field type and re-run\n  } else { throw e; }\n}","preventionTips":["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"],"tags":["kettle","pdi","deserialization","unsupported-type","version-skew"],"backgroundTag":"unsupported-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"}