{"record":{"id":"dfb2b20f84eb4717","repo":"pentaho/pentaho-kettle","slug":"unable-to-convert-string-to-bignumber-while-reading-from","errorCode":null,"errorMessage":"Unable to convert String to BigNumber while reading from data input stream [","messagePattern":"Unable to convert String to BigNumber while reading from data input stream \\[","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/compatibility/Value.java","lineNumber":1601,"sourceCode":"            dis.readFully( chars );\n            setValue( new String( chars, Const.XML_ENCODING ) );\n          }\n          break;\n        case VALUE_TYPE_BIGNUMBER:\n          // read the length\n          int bnLength = dis.readInt();\n          if ( bnLength < 0 ) {\n            setValue( (BigDecimal) null );\n          } else {\n            StringBuilder buffer = new StringBuilder();\n            for ( int i = 0; i < bnLength; i++ ) {\n              buffer.append( dis.readChar() );\n            }\n            setValue( buffer.toString() );\n            try {\n              convertString( VALUE_TYPE_BIGNUMBER );\n            } catch ( KettleValueException e ) {\n              throw new IOException(\n                \"Unable to convert String to BigNumber while reading from data input stream [\"\n                  + getString() + \"]\" );\n            }\n          }\n          break;\n        case VALUE_TYPE_DATE:\n          if ( dis.readBoolean() ) {\n            setValue( new Date( dis.readLong() ) );\n          }\n          break;\n        case VALUE_TYPE_NUMBER:\n          setValue( dis.readDouble() );\n          break;\n        case VALUE_TYPE_INTEGER:\n          setValue( dis.readLong() );\n          break;\n        case VALUE_TYPE_BOOLEAN:\n          setValue( dis.readBoolean() );","sourceCodeStart":1583,"sourceCodeEnd":1619,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/compatibility/Value.java#L1583-L1619","documentation":"resolveIP performs a DNS reverse lookup and requires exactly 2 arguments (the IP address and a timeout/conversion flag per the Kettle function contract). When ArgList.length != 2 the function throws this Rhino runtime error; the lookup itself never throws - failures inside the try block just yield '-'.","triggerScenarios":"Calling resolveIP(ip) with one argument, or resolveIP() with none, or with 3+ arguments from JavaScript in the Script Values step.","commonSituations":"Omitting the second (boolean/timeout) argument assuming it is optional; passing a hostname string plus extra options; refactored calls that dropped an argument.","solutions":["Call with both arguments, e.g. resolveIP(ip, true) per your Kettle version's signature.","Check your Kettle/PDI version's documentation for resolveIP's exact parameter list, since it changed across versions.","Handle the '-' return value which signals lookup failure, distinct from this argument-count error."],"exampleFix":"// before\nvar host = resolveIP(ipField);\n// after\nvar host = resolveIP(ipField, true);","handlingStrategy":"validation","validationCode":"if (arguments.length !== 2) throw new Error(\"resolveIP requires 2 arguments\");\nif (ip == null || ip == \"\") return \"-\";","typeGuard":"null","tryCatchPattern":"var host;\ntry {\n  host = resolveIP(ip, true);\n} catch (e) {\n  host = \"-\"; // mirror the function's own failure sentinel\n}","preventionTips":["Pass both arguments including the boolean flag","Check your PDI version's signature - it changed across releases","Treat the \"-\" return value as a lookup failure, not an error"],"tags":["javascript","argument-count","dns","scripting"],"backgroundTag":"missing-required-argument","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}