pentaho/pentaho-kettle · error · KettleValueException

: I don't know how to convert serializable values to…

Error message

 : I don't know how to convert serializable values to booleans.

What it means

ValueMetaBase.getBoolean(Object) throws this KettleValueException when the field type is TYPE_SERIALIZABLE. PDI does not define a conversion from an arbitrary serialized Java object to a Boolean, so it fails fast with the field metadata in the message. It signals that the field's declared type is incompatible with the requested Boolean output.

Solutions

  1. Change the field's value type to TYPE_BOOLEAN (or another convertible type) before reading it as a Boolean.
  2. Store/serialize an explicit Boolean (or a convertible type like String/Integer) in the field instead of an opaque Serializable object.
  3. Catch KettleValueException and handle the Serializable field with custom conversion logic.

Example fix

// before
Boolean ok = valueMeta.getBoolean( row[i] ); // TYPE_SERIALIZABLE -> throws
// after
if ( valueMeta.getType() == ValueMetaInterface.TYPE_SERIALIZABLE ) {
  Object o = row[i];
  row[i] = o instanceof Boolean ? o : Boolean.FALSE; // put a real Boolean in a BOOLEAN-typed meta
}
Boolean ok = booleanMeta.getBoolean( row[i] );
Defensive patterns

Strategy: type-guard

Validate before calling

if ( valueMeta.getType() == ValueMetaInterface.TYPE_SERIALIZABLE ) {
  throw new IllegalArgumentException( "Field " + valueMeta.getName() + " is SERIALIZABLE; cannot read as Boolean" );
}

Type guard

boolean readableAsBoolean( ValueMetaInterface vm ) {
  int t = vm.getType();
  return t == ValueMetaInterface.TYPE_BOOLEAN || t == ValueMetaInterface.TYPE_STRING
      || t == ValueMetaInterface.TYPE_INTEGER || t == ValueMetaInterface.TYPE_NUMBER
      || t == ValueMetaInterface.TYPE_BIGNUMBER;
}

Try / catch

try {
  Boolean b = valueMeta.getBoolean( row[i] );
} catch ( KettleValueException e ) {
  logError( "Serializable field " + valueMeta.getName() + " cannot be read as boolean" );
}

Prevention

When it happens

Trigger: Calling getBoolean(object) (directly or through RowMeta/getRow readers) on a ValueMeta whose type is TYPE_SERIALIZABLE, typically metadata created with new ValueMetaSerializable(...) or deserialized from a repository where the field was Serializable.

Common situations: Custom step/plugin code that stores objects in rows and later reads them as booleans; transformations where a Serializable field (e.g. from a user-defined Java class step) feeds a Boolean expression; ktr files carried across versions where the field type changed.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaBase.java:2293

            throw new KettleValueException( toString() + " : Unknown storage type " + storageType + " specified." );
        }
      case TYPE_BIGNUMBER:
        switch ( storageType ) {
          case STORAGE_TYPE_NORMAL:
            return convertBigNumberToBoolean( (BigDecimal) object );
          case STORAGE_TYPE_BINARY_STRING:
            return convertBigNumberToBoolean( (BigDecimal) convertBinaryStringToNativeType( (byte[]) object ) );
          case STORAGE_TYPE_INDEXED:
            return convertBigNumberToBoolean( (BigDecimal) index[( (Integer) object ).intValue()] );
          default:
            throw new KettleValueException( toString() + " : Unknown storage type " + storageType + " specified." );
        }
      case TYPE_DATE:
        throw new KettleValueException( toString() + " : I don't know how to convert date values to booleans." );
      case TYPE_BINARY:
        throw new KettleValueException( toString() + " : I don't know how to convert binary values to booleans." );
      case TYPE_SERIALIZABLE:
        throw new KettleValueException( toString() + " : I don't know how to convert serializable values to booleans." );
      default:
        throw new KettleValueException( toString() + " : Unknown type " + type + " specified." );
    }
  }

  @Override
  public Date getDate( Object object ) throws KettleValueException {
    if ( isNull( object ) ) {
      return null;
    }
    switch ( type ) {
      case TYPE_DATE:
        switch ( storageType ) {
          case STORAGE_TYPE_NORMAL:
            return (Date) object;
          case STORAGE_TYPE_BINARY_STRING:
            return (Date) convertBinaryStringToNativeType( (byte[]) object );
          case STORAGE_TYPE_INDEXED:

View on GitHub (pinned to f3058517a1)