Check if you are trying to decode the encoded string or not. This occurs typically when you are trying to decode plaintext at the following place in your code
Base64.getDecoder().decode(encodedText);