apache/hadoop · error · IllegalArgumentException
The data parameter is not a valid base64-encoded string.
Error message
The data parameter is not a valid base64-encoded string.
What it means
Error "The data parameter is not a valid base64-encoded string." thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/utils/Base64.java:69
*/
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 /*
* 112- 127
*/
};
/**
* Decodes a given Base64 string into its corresponding byte array.
*
* @param data
* the Base64 string, as a <code>String</code> object, to decode
*
* @return the corresponding decoded byte array
* @throws IllegalArgumentException
* If the string is not a valid base64 encoded string
*/
public static byte[] decode(final String data) {
if (data == null) {
throw new IllegalArgumentException("The data parameter is not a valid base64-encoded string.");
}
int byteArrayLength = 3 * data.length() / 4;
if (data.endsWith("==")) {
byteArrayLength -= 2;
}
else if (data.endsWith("=")) {
byteArrayLength -= 1;
}
final byte[] retArray = new byte[byteArrayLength];
int byteDex = 0;
int charDex = 0;
for (; charDex < data.length(); charDex += 4) {
// get 4 chars, convert to 3 bytes
final int char1 = DECODE_64[(byte) data.charAt(charDex)];View on GitHub (pinned to 2add963021)
Solutions
- Provide a valid base64-encoded string as input.
- Check for URL-safe vs standard base64 alphabet mismatches in the producer.
When it happens
Trigger: Base64 decoding is attempted on input containing non-base64 characters.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/ce11f4b15d4c05f8.
Report an issue: GitHub.