apache/hadoop · error · IllegalArgumentException
${name} is NULL, empty or contains a '&'
Error message
${name} is NULL, empty or contains a '&' What it means
Error "${name} is NULL, empty or contains a '&'" thrown in apache/hadoop.
Source
Thrown at hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/AuthToken.java:91
checkForIllegalArgument(userName, "userName");
checkForIllegalArgument(principal, "principal");
checkForIllegalArgument(type, "type");
this.userName = userName;
this.principal = principal;
this.type = type;
this.maxInactives = -1;
this.expires = -1;
}
/**
* Check if the provided value is invalid. Throw an error if it is invalid, NOP otherwise.
*
* @param value the value to check.
* @param name the parameter name to use in an error message if the value is invalid.
*/
protected static void checkForIllegalArgument(String value, String name) {
if (value == null || value.length() == 0 || value.contains(ATTR_SEPARATOR)) {
throw new IllegalArgumentException(name + ILLEGAL_ARG_MSG);
}
}
/**
* Sets the max inactive interval of the token.
*
* @param interval max inactive interval of the token in milliseconds since
* the epoch.
*/
public void setMaxInactives(long interval) {
this.maxInactives = interval;
}
/**
* Sets the expiration of the token.
*
* @param expires expiration time of the token in milliseconds since the epoch.
*/View on GitHub (pinned to 2add963021)
Solutions
- Pass a token attribute name that is non-null, non-empty, and contains no '&' character.
Example fix
Use simple attribute names such as 'u' or 'e' when building the token.
When it happens
Trigger: Raised at runtime when the documented precondition or configuration requirement for this operation is violated.
Common situations: Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/a565f5ff6a6a2208.
Report an issue: GitHub.