pentaho/pentaho-kettle · error · KettleValueException
Unable to clone Internet Address
Error message
Unable to clone Internet Address
What it means
cloneValueData() duplicates the stored InetAddress via InetAddress.getByAddress(address bytes). If the JDK rejects the cloned byte array (malformed/unknown address family), the library wraps it in KettleValueException 'Unable to clone Internet Address'.
Solutions
- Ensure the value data is a standard java.net.InetAddress produced by the library's converters
- Catch KettleValueException around row cloning and log/replace the offending value
- Update the JDK if a known provider bug in getByAddress is the cause
Example fix
// before
Object copy = inetMeta.cloneValueData(row[ipIdx]);
// after
Object copy;
try { copy = inetMeta.cloneValueData(row[ipIdx]); }
catch (KettleValueException e) { copy = null; log.warn("Bad IP value dropped: " + e.getMessage()); } Defensive patterns
Strategy: try-catch
Validate before calling
Object d = row[ipIdx]; boolean ok = d instanceof InetAddress && ((InetAddress) d).getAddress().length > 0;
Type guard
boolean isPlainInetAddress(Object o){ return o != null && InetAddress.class.equals(o.getClass()) && o instanceof InetAddress a && a.getAddress().length > 0; } Try / catch
try { copy = inetMeta.cloneValueData(v); } catch (KettleValueException e) { copy = null; log.warn(...); } Prevention
- Store only standard InetAddress instances from the library converters
- Avoid custom InetAddress subclasses in value data
- Keep the JDK updated for network provider fixes
When it happens
Trigger: Calling cloneValueData() (used when Kettle clones rows for row sets, join steps, and multi-target hops) on a value holding an InetAddress whose byte array is invalid for the default JVM provider — rare, usually from custom InetAddress subclasses or corrupted byte arrays.
Common situations: Row cloning in high-throughput transformations (Table Join, Split, sorted merge); exotic JDK network providers or unusual InetAddress implementations produced by custom user code.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- : couldn't convert string [" + string + "] to an internet…
- Unable to convert an Integer to an internet address
- : Unable to get Internet Address from resultset at index "…
- : Unable to set Internet address value on prepared…
- A connection of type PALO is expected
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/fd89476fab59ddcc.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaInternetAddress.java:453
return convertBigNumberToInternetAddress( meta2.getBigNumber( data2 ) );
case TYPE_INET:
return ( (ValueMetaInternetAddress) meta2 ).getInternetAddress( data2 );
default:
throw new KettleValueException( meta2.toStringMeta() + " : can't be converted to an Internet Address" );
}
}
@Override
public Object cloneValueData( Object object ) throws KettleValueException {
InetAddress inetAddress = getInternetAddress( object );
if ( inetAddress == null ) {
return null;
}
try {
return InetAddress.getByAddress( inetAddress.getAddress() );
} catch ( Exception e ) {
throw new KettleValueException( "Unable to clone Internet Address", e );
}
}
@Override
public ValueMetaInterface getMetadataPreview( DatabaseMeta databaseMeta, ResultSet rs )
throws KettleDatabaseException {
try {
if ( "INET".equalsIgnoreCase( rs.getString( "TYPE_NAME" ) ) ) {
ValueMetaInterface vmi = super.getMetadataPreview( databaseMeta, rs );
ValueMetaInterface valueMeta = new ValueMetaInternetAddress( name );
valueMeta.setLength( vmi.getLength() );
valueMeta.setOriginalColumnType( vmi.getOriginalColumnType() );
valueMeta.setOriginalColumnTypeName( vmi.getOriginalColumnTypeName() );
valueMeta.setOriginalNullable( vmi.getOriginalNullable() );
valueMeta.setOriginalPrecision( vmi.getOriginalPrecision() );
valueMeta.setOriginalScale( vmi.getOriginalScale() );
valueMeta.setOriginalSigned( vmi.getOriginalSigned() );View on GitHub (pinned to f3058517a1)