It's all about the answers!

Ask a question

Why am I getting Null Application id Returned for Project Area Creation Using Java API ?


Vaibhav S (106348) | asked Mar 13 '17, 2:15 a.m.
edited Mar 13 '17, 5:29 a.m. by Geoffrey Clemm (30.1k33035)

For the following Project Area Creation code:

ITeamRepository repo = TeamPlatform.getTeamRepositoryService().getTeamRepository(rtcURL);

IProcessItemService service = (IProcessItemService) repo.getClientLibrary(IProcessItemService.class);

IProcessDefinition processDefinition = service.findProcessDefinition(processId, IProcessItemService.ALL_PROPERTIES , MONITOR);

IProjectArea project = service.createProjectArea();

            project.setName(name);
            project.setProcessDefinition(processDefinition);
            service.save(project, MONITOR);

(Logging and all is taken care in code, not mentioned here)

Below exception is thrown:

Invalid application id 'null'. A valid registered fronting application id must be provided to access the JTS.

Please let me know if anyone faced and solved this.

Thanks
Vab

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Mar 13 '17, 3:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I have already shared an example of code that works for me and a lot of others - it is actually shipped as WorkshopSetup with the extensions workshop. See the descripotion here: https://rsjazz.wordpress.com/2013/09/18/deploying-templates-and-creating-projects-using-the-plain-java-clients-library/



 
I am pretty sure that you try to use the API against the wrong application

Note: The code must be run against the CCM ( https://server:port/ccm ) and not JTS https://server:port/jts). 

The error seems to be from JTS and not CCM so try to change the URL to CCM.




Vaibhav S selected this answer as the correct answer

Comments
Ralph Schoon commented Mar 13 '17, 3:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 PS: you are not using OSLC you are using the plain Java client libraies.


Vaibhav S commented Mar 13 '17, 4:13 a.m.

Thank you Ralph. Replaced CCM with JTS in URL. It works fine now.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.