pentaho/pentaho-kettle · error · KettleValueException

: Unknown storage type " + storageType + " specified.

Error message

 : Unknown storage type " + storageType + " specified.

What it means

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.

Solutions

  1. Inspect the source of the metadata object and fix the invalid setStorageType() call
  2. Normalize to STORAGE_TYPE_NORMAL before conversion
  3. Validate storageType (0..2) immediately after loading/deserializing metadata
  4. Replace hand-built metadata with ValueMetaFactory-created metadata

Example fix

// before
Object v = meta.getInteger(rowData); // throws if storageType invalid
// after
if (meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_NORMAL
    && meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_BINARY_STRING
    && meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_INDEXED) {
  throw new KettleException("Bad metadata: " + meta.toString());
}
Object v = meta.getInteger(rowData);
Defensive patterns

Strategy: type-guard

Validate before calling

if (meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_NORMAL
    && meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_BINARY_STRING
    && meta.getStorageType() != ValueMetaInterface.STORAGE_TYPE_INDEXED) {
  throw new KettleException("Field " + meta.getName() + " has invalid storage type " + meta.getStorageType());
}

Type guard

boolean valid = meta.getStorageType() == ValueMetaInterface.STORAGE_TYPE_NORMAL
    || meta.getStorageType() == ValueMetaInterface.STORAGE_TYPE_BINARY_STRING
    || meta.getStorageType() == ValueMetaInterface.STORAGE_TYPE_INDEXED;

Try / catch

try {
  Long v = meta.getInteger(object);
} catch (KettleValueException e) {
  if (e.getMessage().contains("Unknown storage type")) { /* fix metadata or fail fast */ }
  throw e;
}

Prevention

When it happens

Trigger: Reading an Internet Address value whose type is TYPE_INTEGER and whose storageType holds an unrecognized code, via getInternetAddress()/getInteger()/getString()/getNativeDataType().

Common situations: 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.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/d98a594910d5c181. Report an issue: GitHub.

Appendix: source

Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaInternetAddress.java:119

          case STORAGE_TYPE_NORMAL:
            return convertNumberToInternetAddress( (Double) object );
          case STORAGE_TYPE_BINARY_STRING:
            return convertNumberToInternetAddress( (Double) convertBinaryStringToNativeType( (byte[]) object ) );
          case STORAGE_TYPE_INDEXED:
            return convertNumberToInternetAddress( (Double) index[( (Integer) object ).intValue()] );
          default:
            throw new KettleValueException( toString() + " : Unknown storage type " + storageType + " specified." );
        }
      case TYPE_INTEGER:
        switch ( storageType ) {
          case STORAGE_TYPE_NORMAL:
            return convertIntegerToInternetAddress( (Long) object );
          case STORAGE_TYPE_BINARY_STRING:
            return convertIntegerToInternetAddress( (Long) convertBinaryStringToNativeType( (byte[]) object ) );
          case STORAGE_TYPE_INDEXED:
            return convertIntegerToInternetAddress( (Long) index[( (Integer) object ).intValue()] );
          default:
            throw new KettleValueException( toString() + " : Unknown storage type " + storageType + " specified." );
        }
      case TYPE_BIGNUMBER:
        switch ( storageType ) {
          case STORAGE_TYPE_NORMAL:
            return convertBigNumberToInternetAddress( (BigDecimal) object );
          case STORAGE_TYPE_BINARY_STRING:
            return convertBigNumberToInternetAddress( (BigDecimal) convertBinaryStringToNativeType( (byte[]) object ) );
          case STORAGE_TYPE_INDEXED:
            return convertBigNumberToInternetAddress( (BigDecimal) index[( (Integer) object ).intValue()] );
          default:
            throw new KettleValueException( toString() + " : Unknown storage type " + storageType + " specified." );
        }
      case TYPE_BOOLEAN:
        throw new KettleValueException( toString()
          + " : I don't know how to convert a boolean to a Internet address." );
      case TYPE_BINARY:
        throw new KettleValueException( toString()
          + " : I don't know how to convert a binary value to Internet address." );

View on GitHub (pinned to f3058517a1)