`javax.crypto.BadPaddingException: Given final block not properly padded` is returned for a data import or export failure

2024-08-09 02:52:24  Updated

Symptom

A data import or export task fails, and the following exception is thrown in the task summary: javax.crypto.BadPaddingException: Given final block not properly padded.

Possible causes

This exception is caused because the ODP password failed to be decrypted.

Solutions

Solution 1

We recommend that you install Open JDK 1.8.0_242 or later to ensure consistent versions of JRE and JCE.

Solution 2

Download the jce_policy plug-in of the same version as the JDK being used from the Oracle official website, decompress the package, and then replace the original local_policy.jar and US_export_policy.jar files with those in the decompressed files.

Solution 3

Upgrade ODC to V2.3.0 or a later version. This issue will not occur in ODC V2.3.0 and later versions because the decryption policy is changed.

Contact Us