pentaho/pentaho-kettle · error · IllegalArgumentException

KafkaConsumerField.Type.ERROR.NoValueMetaInterfaceMapping

KafkaConsumerField.Type.ERROR.NoValueMetaInterfaceMapping

Error message

KafkaConsumerField.Type.ERROR.NoValueMetaInterfaceMapping

What it means

KafkaConsumerField.fromValueMetaInterface maps a ValueMetaInterface type code to the plugin's Type enum; if the incoming ValueMetaInterface's type has no corresponding enum constant, it throws IllegalArgumentException with KafkaConsumerField.Type.ERROR.NoValueMetaInterfaceMapping including the field name and numeric type. This surfaces when the Kafka consumer field definition carries a Kettle type the plugin doesn't support.

Solutions

  1. Change the upstream field to a supported type (String, Integer, Long, Double, BigDecimal, Date, Boolean, Timestamp, Binary) with a 'Select values' / 'Change data type' step.
  2. Update the Kafka Consumer step's field Output Type to a supported enum value.
  3. Check plugin versions; upgrade the Kafka plugin/PDI if a newer version added the mapping you need.
  4. Convert unsupported types to String before feeding the Kafka Consumer step.

Example fix

// before (Select values step leaves field as Serializable)
metaType: Serializable
// after
metaType: String
Defensive patterns

Strategy: validation

Validate before calling

// Before writing to Kafka, normalize field types upstream (Select values step)
// or in UDJC:
ValueMetaInterface vmi = rowMeta.searchValueMeta(fieldName);
Set<Integer> supported = Set.of(
  ValueMetaInterface.TYPE_STRING, ValueMetaInterface.TYPE_INTEGER,
  ValueMetaInterface.TYPE_NUMBER, ValueMetaInterface.TYPE_BIGNUMBER,
  ValueMetaInterface.TYPE_DATE, ValueMetaInterface.TYPE_BOOLEAN,
  ValueMetaInterface.TYPE_TIMESTAMP, ValueMetaInterface.TYPE_BINARY);
if (!supported.contains(vmi.getType())) {
  throw new IllegalStateException("Unsupported Kafka field type: " + vmi.getType() + " for " + fieldName);
}

Try / catch

try { consumerField = KafkaConsumerField.fromValueMetaInterface(vmi); } catch (IllegalArgumentException e) {
  log.warn("No mapping for type " + vmi.getType() + "; defaulting to String");
  consumerField = KafkaConsumerField.Type.String;
}

Prevention

When it happens

Trigger: fromValueMetaInterface is given a non-null ValueMetaInterface whose getType() integer matches no Type.getValueMetaInterfaceType() in the enum — e.g. a binary/serialization type added by another plugin or an unusual type assigned upstream in the transformation.

Common situations: Upstream step emits an exotic ValueMeta type (e.g. Avro/serializable) that the Kafka consumer field can't represent; transformation edited across plugin versions where enum coverage changed; misconfigured field output type in the Kafka Consumer dialog.

Related errors


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

Appendix: source

Thrown at plugins/kafka/core/src/main/java/org/pentaho/big/data/kettle/plugins/kafka/KafkaConsumerField.java:127

      return valueMetaInterfaceType;
    }

    public Class getKafkaSerializerClass() {
      return kafkaSerializerClass;
    }

    public Class getKafkaDeserializerClass() {
      return kafkaDeserializerClass;
    }

    public static Type fromValueMetaInterface( ValueMetaInterface vmi ) {
      if ( vmi != null ) {
        for ( Type t : Type.values() ) {
          if ( vmi.getType() == t.getValueMetaInterfaceType() ) {
            return t;
          }
        }
        throw new IllegalArgumentException( BaseMessages.getString( PKG,
          "KafkaConsumerField.Type.ERROR.NoValueMetaInterfaceMapping", vmi.getName(), vmi.getType() ) );
      }
      // if it's null, just default to string
      return String;
    }
  }

  public enum Name {
    KEY( "key" ) {
      @Override public void setFieldOnMeta( KafkaConsumerInputMeta meta, KafkaConsumerField field ) {
        meta.setKeyField( field );
      }

      @Override public KafkaConsumerField getFieldFromMeta( KafkaConsumerInputMeta meta ) {
        return meta.getKeyField();
      }
    },
    MESSAGE( "message" ) {

View on GitHub (pinned to f3058517a1)