{"record":{"id":"aa04a67cdee1185a","repo":"pentaho/pentaho-kettle","slug":"unable-to-de-serialize-indexed-storage-type-for-data-type","errorCode":null,"errorMessage":" : Unable to de-serialize indexed storage type for data type ","messagePattern":" : Unable to de-serialize indexed storage type for data type ","errorType":"exception","errorClass":"KettleFileException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java","lineNumber":3146,"sourceCode":"                  index[i] = readNumber( inputStream );\n                  break;\n                case TYPE_INTEGER:\n                  index[i] = readInteger( inputStream );\n                  break;\n                case TYPE_DATE:\n                  index[i] = readDate( inputStream );\n                  break;\n                case TYPE_BIGNUMBER:\n                  index[i] = readBigNumber( inputStream );\n                  break;\n                case TYPE_BOOLEAN:\n                  index[i] = readBoolean( inputStream );\n                  break;\n                case TYPE_BINARY:\n                  index[i] = readBinary( inputStream );\n                  break;\n                default:\n                  throw new KettleFileException( toString()\n                      + \" : Unable to de-serialize indexed storage type for data type \" + getType() );\n              }\n            }\n          }\n          break;\n\n        case STORAGE_TYPE_BINARY_STRING:\n          // In case we do have storage metadata defined, we read that back in as\n          // well..\n          if ( inputStream.readBoolean() ) {\n            storageMetadata = new ValueMetaBase( inputStream );\n          }\n          break;\n\n        default:\n          break;\n      }\n","sourceCodeStart":3128,"sourceCodeEnd":3164,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java#L3128-L3164","documentation":"When a value meta uses indexed storage (STORAGE_TYPE_INDEXED), readMetaData de-serializes the index array element-by-element according to the value's data type. If the value's type is not one of the serializable indexed types (String, Number, Integer, Date, BigNumber, Boolean, Binary), a KettleFileException is thrown with this message. It means the indexed storage data type is unsupported for stream de-serialization.","triggerScenarios":"Reading value metadata from an InputStream where a field has storageType=INDEXED and a data type not handled by the switch in readMetaData (e.g. TYPE_TIMESTAMP, TYPE_INET, TYPE_JSON, TYPE_AVRO). Also produced by corrupt/foreign stream data that yields an unrecognized getType().","commonSituations":"Row metadata containing an indexed value of a newer type (Timestamp/Inet) serialized by a newer Pentaho version and read by an older one; hand-built ValueMetaInteger-based indexed fields via setIndexedConversionTypes misuse; corrupted metadata streams.","solutions":["Change the indexed field's data type to one of the supported indexed types (String, Number, Integer, Date, BigNumber, Boolean, Binary), e.g. store a Timestamp index as Date or String.","Ensure both producer and consumer use the same Pentaho/Kettle version so the supported indexed-type set matches.","Inspect the value meta with toStringMeta() and log getType() to identify which type hits the default branch.","If the stream is corrupt or from an incompatible writer, regenerate/re-export the metadata."],"exampleFix":"// before: indexed storage with an unsupported type\nValueMetaBase vm = new ValueMetaBase(\"status\", ValueMetaInterface.TYPE_TIMESTAMP);\nvm.setStorageType(ValueMetaInterface.STORAGE_TYPE_INDEXED);\n// after: use a supported type for the index\nValueMetaBase vm = new ValueMetaBase(\"status\", ValueMetaInterface.TYPE_STRING);\nvm.setStorageType(ValueMetaInterface.STORAGE_TYPE_INDEXED);","handlingStrategy":"validation","validationCode":"int[] ok = { TYPE_STRING, TYPE_NUMBER, TYPE_INTEGER, TYPE_DATE, TYPE_BIGNUMBER, TYPE_BOOLEAN, TYPE_BINARY };\nboolean okType = Arrays.stream(ok).anyMatch(t -> t == vm.getType());\nif (vm.getStorageType() == STORAGE_TYPE_INDEXED && !okType) {\n  throw new KettleException(\"Indexed storage does not support type \" + vm.getTypeDesc());\n}","typeGuard":"boolean isIndexedSerializable(ValueMetaInterface vm) {\n  return vm.getStorageType() == ValueMetaInterface.STORAGE_TYPE_INDEXED\n      && (vm.getType() == ValueMetaInterface.TYPE_STRING\n       || vm.getType() == ValueMetaInterface.TYPE_NUMBER\n       || vm.getType() == ValueMetaInterface.TYPE_INTEGER\n       || vm.getType() == ValueMetaInterface.TYPE_DATE\n       || vm.getType() == ValueMetaInterface.TYPE_BIGNUMBER\n       || vm.getType() == ValueMetaInterface.TYPE_BOOLEAN\n       || vm.getType() == ValueMetaInterface.TYPE_BINARY);\n}","tryCatchPattern":"try {\n  valueMeta.readMetaData(dataInputStream);\n} catch (KettleFileException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"de-serialize indexed storage type\")) {\n    logError(\"Unsupported indexed type: \" + valueMeta.toStringMeta());\n  }\n  throw e;\n}","preventionTips":["Only use indexed storage for the seven supported data types.","Run metadata validation (RowMetaUtil/meta checks) before serializing transformations.","Keep designer and runtime Kettle versions in sync."],"tags":["serialization","metadata","indexed-storage","unsupported-type"],"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"}