ARTIFACTORY: How to resolve Unable to translate path error message

ARTIFACTORY: How to resolve Unable to translate path error message

AuthorFullName__c
Logeshwaran R
articleNumber
000006289
ft:sourceType
Salesforce
FirstPublishedDate
2024-12-30T18:37:32Z
lastModifiedDate
2025-05-22
VersionNumber
2
When promoting the build from one repository to another repository, we might face this issue when the repository layout configured is different from that of the repository type.

 [🔵Info] Promoting build...
[🚨Error] server response: 400 Bad Request
{
  "messages": [
    {
      "level": "WARNING",
      "message": "Unable to translate path 'ant-apache-bcel-1.6.5.jar': does not represent a valid module path within the source."
    },
    {
      "level": "INFO",
      "message": "Skipping promotion status update: item promotion was completed with errors and warnings."
    }
  ]
}
Steps to resolve the issue:

1. Check if the artifact is present inside the build by selecting the artifact in the Artifactory and then check the builds tabs for the build.

User-added image 


2. We can cross-check this by verifying whether the artifact is present in the build info from the builds section.

User-added image 

3. If the artifact is not available in the local repository, we need to deploy and publish the artifact with the correct build name and build number again.

4. If the artifact is available in the local repository but not linked to the build then follow the steps in the knowledge base article to link the artifacts with the build again.

5. If the artifact is present in the build, then we need to check for the repo layout of the repository. Here, in this example, the source repository is Maven. However, the repository layout used was “simple-default” layout.

User-added image 


6. To solve this issue, we need to change the repository layout to the layout of the package type, in our case it is maven2-default. After changing we will be able to promote the artifact from one repository to another repository
22:57:16 [🔵Info] Promoting build...
22:57:17 [🔵Info] Promoted build test/1 to: promote-libs-release-local repository.
Kindly perform the manual index recalculation on the source repository after changing the repository layout by selecting the ‘Recalculate index’ on the index menu of the repository.

User-added image 

We need to keep in mind that changing the repo layout may cause uncertain issues during future deployments, if the deployment logic followed by the CI server is strictly abides by the existing layout format, hence taking backups of the repositories by performing repository export is suggested.