alibaba/DataX · error · IllegalArgumentException
参数 bigInteger 不能为空.
Error message
参数 bigInteger 不能为空.
What it means
RangeSplitUtil.stringToBigInteger(String, int radix) throws IllegalArgumentException('参数 bigInteger 不能为空.') when the input string is null. It encodes an ASCII string into a BigInteger (base-radix positional encoding of char codes) so string ranges can be split numerically; a null string has no encoding.
Source
Thrown at common/src/main/java/com/alibaba/datax/common/util/RangeSplitUtil.java:107
}
return result;
}
}
private static void checkIfBetweenRange(int value, int left, int right) {
if (value < left || value > right) {
throw new IllegalArgumentException(String.format("parameter can not <[%s] or >[%s].",
left, right));
}
}
/**
* 由于只支持 ascii 码对应字符,所以radix 范围为[1,128]
*/
public static BigInteger stringToBigInteger(String aString, int radix) {
if (null == aString) {
throw new IllegalArgumentException("参数 bigInteger 不能为空.");
}
checkIfBetweenRange(radix, 1, 128);
BigInteger result = BigInteger.ZERO;
BigInteger radixBigInteger = BigInteger.valueOf(radix);
int tempChar;
int k = 0;
for (int i = aString.length() - 1; i >= 0; i--) {
tempChar = aString.charAt(i);
if (tempChar >= 128) {
throw new IllegalArgumentException(String.format("根据字符串进行切分时仅支持 ASCII 字符串,而字符串:[%s]非 ASCII 字符串.", aString));
}
result = result.add(BigInteger.valueOf(tempChar).multiply(radixBigInteger.pow(k)));
k++;
}View on GitHub (pinned to 80ec23d5c5)
Solutions
- Ensure the splitPk string column is NOT NULL and contains data.
- Check that the job config actually supplies the string range values (no missing/misspelled keys).
- Null-check before calling and fall back to a non-split single task.
Example fix
// before
BigInteger start = RangeSplitUtil.stringToBigInteger(startStr, radix);
// after
if (startStr == null || endStr == null) {
return false; // caller: skip string splitting
}
BigInteger start = RangeSplitUtil.stringToBigInteger(startStr, radix); Defensive patterns
Strategy: type-guard
Validate before calling
if (str == null) { /* skip string split */ }
BigInteger v = RangeSplitUtil.stringToBigInteger(str, radix); Type guard
static boolean splittableString(String s, int radix) {
return s != null && radix >= 1 && radix <= 128;
} Prevention
- Ensure splitPk string column is NOT NULL and populated.
- Guard null boundary strings before encoding.
When it happens
Trigger: Calling stringToBigInteger(null, radix). Occurs when a string splitPk's boundary value is null — e.g. the reader could not obtain min/max string values, or a config key holding the string range was absent.
Common situations: String-type splitPk on a nullable column; job JSON missing the range parameter that gets passed through to the splitter.
Related errors
- 对 BigInteger 进行切分时,其左右区间不能为 null. 此处:left=[%s],right=[%s].
- 根据字符串进行切分时仅支持 ASCII 字符串,而字符串:[%s]非 ASCII 字符串.
- 切分份数不能小于1. 此处:expectSliceNumber=[%s].
- CONFIG_ERROR
- 您提供的配置文件有误. 路径[%s]需要配置Json格式的Map对象,但该节点发现实际类型是[%s]. 请检查您的配置并
AI-assisted analysis of alibaba/DataX@80ec23d5c5 (2026-08-14).
Data as JSON: /api/errors/acfd4c5345227bf3.
Report an issue: GitHub.