pentaho/pentaho-kettle · error · KettleDatabaseException
: Unable to get Internet Address from resultset at index "…
Error message
: Unable to get Internet Address from resultset at index " + index
What it means
getValueFromResultSet() reads the column as a String and parses it to an InetAddress. Any JDBC failure (invalid index, closed result set, driver errors) or unparseable address string is wrapped in KettleDatabaseException 'Unable to get Internet Address from resultset at index N'.
Solutions
- Ensure the row metadata indices match the actual query select-list order
- Sanitize/standardize the column contents in the database or via SQL CAST/expression
- Catch KettleDatabaseException and use error handling to capture failing rows
- Verify the connection is alive and the ResultSet is not consumed out of order
Example fix
// before
Object v = inetMeta.getValueFromResultSet(dbInterface, rs, idx);
// after
Object v;
try { v = inetMeta.getValueFromResultSet(dbInterface, rs, idx); }
catch (KettleDatabaseException e) { v = null; log.warn("IP read failed at " + idx + ": " + e.getMessage()); } Defensive patterns
Strategy: try-catch
Validate before calling
int colCount = rs.getMetaData().getColumnCount(); boolean ok = index >= 0 && index < colCount && !rs.isClosed();
Type guard
boolean readable(ResultSet rs, int idx) throws SQLException { return !rs.isClosed() && idx >= 0 && idx < rs.getMetaData().getColumnCount(); } Try / catch
try { v = inetMeta.getValueFromResultSet(dbIface, rs, idx); } catch (KettleDatabaseException e) { v = null; log.warn(...); } Prevention
- Keep row meta in sync with the actual SELECT list
- Sanitize IP columns in the database
- Handle dropped connections with reconnect + re-fetch logic
When it happens
Trigger: Reading a row from a ResultSet where index is out of range, the statement/result set is closed, or the column value is not a valid IP literal string.
Common situations: Queries whose select-list changed after the row meta was built (index mismatch); database columns containing hostnames or malformed IPs; connection dropped mid-fetch.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- : Unable to set Internet address value on prepared…
- Error evaluating Internet address value metadata
- Error updating batch
- GPBulkLoaderMeta.Exception.ErrorGettingFields
- LucidDBStreamingLoaderMeta.Exception.ErrorGettingFields
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/5aca46465b961247.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/row/value/ValueMetaInternetAddress.java:513
getOriginalColumnMetadata( valueMeta, rm, index, ignoreLength );
return valueMeta;
}
}
return null;
} catch ( Exception e ) {
throw new KettleDatabaseException( "Error evaluating Internet address value metadata", e );
}
}
@Override
public Object getValueFromResultSet( DatabaseInterface databaseInterface, ResultSet resultSet, int index ) throws KettleDatabaseException {
try {
return convertStringToInternetAddress( resultSet.getString( index + 1 ) );
} catch ( Exception e ) {
throw new KettleDatabaseException( toStringMeta()
+ " : Unable to get Internet Address from resultset at index " + index, e );
}
}
@Override
public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement,
int index, Object data ) throws KettleDatabaseException {
try {
preparedStatement.setObject( index, getString( data ), Types.OTHER );
} catch ( Exception e ) {
throw new KettleDatabaseException( toStringMeta()
+ " : Unable to set Internet address value on prepared statement on index " + index, e );
}
View on GitHub (pinned to f3058517a1)