ARTIFACTORY: How to Solve the ‘Given final block not properly padded’ Error During Artifactory Import/Export

ARTIFACTORY: How to Solve the ‘Given final block not properly padded’ Error During Artifactory Import/Export

AuthorFullName__c
Sam Rosenstein
articleNumber
000005185
ft:sourceType
Salesforce
FirstPublishedDate
2021-12-27T07:04:04Z
lastModifiedDate
2024-03-10T07:47:20Z
VersionNumber
5

When performing a system import/export for Artifactory, the following error can occur:
[http-nio-8081-exec-8] - Failed system import: Could not merge and save new descriptor [org.jfrog.common.ExecutionFailed: Last retry failed: Failed to reload configuration: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.. Not trying again]

The reason for this error is that the data is encrypted during the export and the target Artifactory is unable to properly perform the import.

The encryption must be disabled on the source instance. Therefore please follow these steps in order to perform the import/export:

  1. Deactivate the encryption on the source instance
  2. Export the Artifactory instance
  3. Perform the import  on the new instance
  4. Reenable encryption on the source instance

Additionally, if using an external DB instance, please connect the target to an empty DB before performing the import.