pentaho/pentaho-kettle · error · KettleValueException

: it's not possible to convert from Internet Address to a…

Error message

: it's not possible to convert from Internet Address to a date

What it means

ValueMetaInternetAddress.getDate() is intentionally unimplemented: an Internet Address cannot be meaningfully represented as a Kettle Date, so the method unconditionally throws this KettleValueException. Any attempt to read an Internet Address field as a date hits this hard stop.

Solutions

  1. Do not read Internet Address fields as dates; use getInternetAddress()/getString()/getStringMeta() instead
  2. Fix the target field metadata so the field is not typed as Date downstream
  3. Check valueMeta.getType()/getTypeDesc() before choosing which getter to call
  4. If you need a timestamp alongside the address, add a separate Date field to the row

Example fix

// before
Date d = internetAddressMeta.getDate(row[i]); // always throws
// after
if (internetAddressMeta instanceof ValueMetaInternetAddress) {
  String s = internetAddressMeta.getString(row[i]); // or getInternetAddress(...)
} else {
  Date d = internetAddressMeta.getDate(row[i]);
}
Defensive patterns

Strategy: type-guard

Validate before calling

if (meta instanceof ValueMetaInternetAddress) {
  throw new KettleException("Field " + meta.getName() + " is an Internet address; use getInternetAddress()/getString(), not getDate()");
}

Type guard

boolean isDateReadable = !(meta instanceof ValueMetaInternetAddress)
    && meta.getType() != ValueMetaInterface.TYPE_INET;

Try / catch

try {
  Date d = meta.getDate(object);
} catch (KettleValueException e) {
  if (e.getMessage().contains("Internet Address to a date")) { /* use getString/getInternetAddress instead */ }
  throw e;
}

Prevention

When it happens

Trigger: Calling getDate(object) on a ValueMetaInternetAddress directly, or any pipeline step that requests date output for a field whose metadata is Internet Address (e.g. a 'Select values' / calculator step converting to Date).

Common situations: Misconfigured transform that maps an IP/host field into a Date-typed target; generic row-reading code iterating fields and calling getDate() on every value without checking the field type; copy/paste of field mappings after a type change.

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/bdfb63ac934bf7a2. Report an issue: GitHub.

Appendix: source

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

        }
      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." );
      case TYPE_SERIALIZABLE:
        throw new KettleValueException( toString()
          + " : I don't know how to convert a serializable value to Internet address." );

      default:
        throw new KettleValueException( toString() + " : Unknown type " + type + " specified." );
    }
  }

  @Override
  public Date getDate( Object object ) throws KettleValueException {
    throw new KettleValueException( toStringMeta()
      + ": it's not possible to convert from Internet Address to a date" );
  }

  @Override
  public Long getInteger( Object object ) throws KettleValueException {
    InetAddress address = getInternetAddress( object );
    if ( address == null ) {
      return null;
    }
    long total = 0L;
    byte[] addr = address.getAddress();

    if ( addr.length > 8 ) {
      throw new KettleValueException( "Unable to convert Internet Address v6 to an Integer: "
        + getString( object ) + " (The precision is too high to be contained in a long integer value)" );
    }

    for ( int i = 0; i < addr.length; i++ ) {

View on GitHub (pinned to f3058517a1)