pentaho/pentaho-kettle · error · RhinoRuntimeError
The function call resolveIP requires 2 arguments.
Error message
The function call resolveIP requires 2 arguments.
What it means
Arity guard for resolveIP: the function takes exactly two arguments (hostname/IP and a flag where "IP" yields the hostname and anything else the address). Network failures themselves are swallowed and return "-"; only a wrong argument count throws.
Solutions
- Call resolveIP(host, "IP") or resolveIP(host, "host") with exactly two arguments
- Check the result for "-" to detect resolution failure
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at engine/src/main/java/org/pentaho/di/trans/steps/scriptvalues_mod/ScriptValuesAddedFunctions.java:1727 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/97b07bb0259f59f8.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/scriptvalues_mod/ScriptValuesAddedFunctions.java:1727
public static String resolveIP( Context actualContext, Scriptable actualObject, Object[] ArgList,
Function FunctionContext ) {
String sRC;
if ( ArgList.length == 2 ) {
try {
InetAddress address = InetAddress.getByName( Context.toString( ArgList[0] ) );
if ( Context.toString( ArgList[1] ).equals( "IP" ) ) {
sRC = address.getHostName();
} else {
sRC = address.getHostAddress();
}
if ( sRC.equals( Context.toString( ArgList[0] ) ) ) {
sRC = "-";
}
} catch ( Exception e ) {
sRC = "-";
}
} else {
throw Context.reportRuntimeError( "The function call resolveIP requires 2 arguments." );
}
return sRC;
}
// Loading additional JS Files inside the JavaScriptCode
public static void LoadScriptFile( Context actualContext, Scriptable actualObject, Object[] ArgList,
Function FunctionContext ) {
for ( int i = 0; i < ArgList.length; i++ ) { // don't worry about "undefined" arguments
checkAndLoadJSFile( actualContext, actualObject, Context.toString( ArgList[i] ) );
}
}
// Adding the ScriptsItemTab to the actual running Context
public static void LoadScriptFromTab( Context actualContext, Scriptable actualObject, Object[] ArgList,
Function FunctionContext ) {
try {
for ( int i = 0; i < ArgList.length; i++ ) { // don't worry about "undefined" argumentsView on GitHub (pinned to f3058517a1)