Five Stars

Metaservlet associatePreGeneratedJob call fails to create task from Nexus artifact

I am using MetaservletCaller to create a task from a pregenerated job.
 
Here is the request:
 -> Json parameters:
{
  "actionName": "associatePreGeneratedJob",
  "active": true,
  "authPass": "XXX",
  "authUser": "YYY",
  "contextName": "CI",
  "description": " description",
  "executionServerName": "serv1",
  "importType": "Nexus",
  "logLevel": "Info",
  "nexusArtifactId": "testjob_LM_Processing",
  "nexusGroupId": "org.talend.job.my_group",
  "nexusRepository": "snapshots",
  "nexusVersion": "0.1.005933_24f0b469-SNAPSHOT",
  "onUnknownStateJob": "WAIT",
  "pauseOnError": false,
  "taskName": "task123",
  "taskType": "Normal"
}
 
Here is the response:
{
  "error": "config.scheduler.archiva.url.inavailable",
  "returnCode": 181
}
 
The path of the job in the Nexus repository 'snapshots' is:
/org/talend/job/my_group/testjob_LM_Processing/0.1.005933_24f0b469-SNAPSHOT/testjob_LM_Processing-0.1.005933_24f0b469-20180515.032432-1.zip
 
So, what does the error mean?
Do I need to specify 'nexusJobVersionSuffix' too? What do I put in this?
2 REPLIES
Moderator

Re: Metaservlet associatePreGeneratedJob call fails to create task from Nexus artifact

Hello,

Could you please indicate on which talend build version you got this issue?

We have a known jira issue about creating Artifact Task with Metaservlet API.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Employee

Re: Metaservlet associatePreGeneratedJob call fails to create task from Nexus artifact

Also per the documentation you are missing the parameter nexusJobVersionSuffix .

"nexusJobVersionSuffix": "1.0.0-20170516.043751-1",