{"record":{"id":"d98a594910d5c181","repo":"pentaho/pentaho-kettle","slug":"unknown-storage-type-storagetype-specified-d98a59","errorCode":null,"errorMessage":" : Unknown storage type \" + storageType + \" specified.","messagePattern":" : Unknown storage type \" \\+ storageType \\+ \" specified\\.","errorType":"exception","errorClass":"KettleValueException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/ValueMetaInternetAddress.java","lineNumber":119,"sourceCode":"          case STORAGE_TYPE_NORMAL:\n            return convertNumberToInternetAddress( (Double) object );\n          case STORAGE_TYPE_BINARY_STRING:\n            return convertNumberToInternetAddress( (Double) convertBinaryStringToNativeType( (byte[]) object ) );\n          case STORAGE_TYPE_INDEXED:\n            return convertNumberToInternetAddress( (Double) index[( (Integer) object ).intValue()] );\n          default:\n            throw new KettleValueException( toString() + \" : Unknown storage type \" + storageType + \" specified.\" );\n        }\n      case TYPE_INTEGER:\n        switch ( storageType ) {\n          case STORAGE_TYPE_NORMAL:\n            return convertIntegerToInternetAddress( (Long) object );\n          case STORAGE_TYPE_BINARY_STRING:\n            return convertIntegerToInternetAddress( (Long) convertBinaryStringToNativeType( (byte[]) object ) );\n          case STORAGE_TYPE_INDEXED:\n            return convertIntegerToInternetAddress( (Long) index[( (Integer) object ).intValue()] );\n          default:\n            throw new KettleValueException( toString() + \" : Unknown storage type \" + storageType + \" specified.\" );\n        }\n      case TYPE_BIGNUMBER:\n        switch ( storageType ) {\n          case STORAGE_TYPE_NORMAL:\n            return convertBigNumberToInternetAddress( (BigDecimal) object );\n          case STORAGE_TYPE_BINARY_STRING:\n            return convertBigNumberToInternetAddress( (BigDecimal) convertBinaryStringToNativeType( (byte[]) object ) );\n          case STORAGE_TYPE_INDEXED:\n            return convertBigNumberToInternetAddress( (BigDecimal) index[( (Integer) object ).intValue()] );\n          default:\n            throw new KettleValueException( toString() + \" : Unknown storage type \" + storageType + \" specified.\" );\n        }\n      case TYPE_BOOLEAN:\n        throw new KettleValueException( toString()\n          + \" : I don't know how to convert a boolean to a Internet address.\" );\n      case TYPE_BINARY:\n        throw new KettleValueException( toString()\n          + \" : I don't know how to convert a binary value to Internet address.\" );","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/ValueMetaInternetAddress.java#L101-L137","documentation":"The TYPE_INTEGER branch of getInternetAddress() throws this KettleValueException when storageType does not match any of the three supported storage-type constants (NORMAL, BINARY_STRING, INDEXED). It is a defensive default case guarding against invalid internal metadata, not a user-input error.","triggerScenarios":"Reading an Internet Address value whose type is TYPE_INTEGER and whose storageType holds an unrecognized code, via getInternetAddress()/getInteger()/getString()/getNativeDataType().","commonSituations":"Corrupted row metadata after serialization across PDI versions; plugin code passing raw ints instead of ValueMetaInterface.STORAGE_TYPE_* constants; metadata cloned from a non-InternetAddress ValueMeta with mismatched storage-type semantics.","solutions":["Inspect the source of the metadata object and fix the invalid setStorageType() call","Normalize to STORAGE_TYPE_NORMAL before conversion","Validate storageType (0..2) immediately after loading/deserializing metadata","Replace hand-built metadata with ValueMetaFactory-created metadata"],"exampleFix":"// before\nObject v = meta.getInteger(rowData); // throws if storageType invalid\n// after\nif (meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_NORMAL\n    && meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_BINARY_STRING\n    && meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_INDEXED) {\n  throw new KettleException(\"Bad metadata: \" + meta.toString());\n}\nObject v = meta.getInteger(rowData);","handlingStrategy":"type-guard","validationCode":"if (meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_NORMAL\n    && meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_BINARY_STRING\n    && meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_INDEXED) {\n  throw new KettleException(\"Field \" + meta.getName() + \" has invalid storage type \" + meta.getStorageType());\n}","typeGuard":"boolean valid = meta.getStorageType() == ValueMetaInterface.STORAGE_TYPE_NORMAL\n    || meta.getStorageType() == ValueMetaInterface.STORAGE_TYPE_BINARY_STRING\n    || meta.getStorageType() == ValueMetaInterface.STORAGE_TYPE_INDEXED;","tryCatchPattern":"try {\n  Long v = meta.getInteger(object);\n} catch (KettleValueException e) {\n  if (e.getMessage().contains(\"Unknown storage type\")) { /* fix metadata or fail fast */ }\n  throw e;\n}","preventionTips":["Fail fast at metadata-load time, not at row-processing time","Never hardcode storage type integers in transform code","Compare metadata from both sides of a stream merge before joining","Log full meta.toString() on conversion failures"],"tags":["kettle","pdi","value-meta","storage-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"}