It's all about the answers!

Ask a question

Build result kjm_test_snapshot2 does not have a "start" request


K M (38325251) | asked Nov 25 '13, 12:49 p.m.
I create a build def using the java api
I create a build result using the java api
When I display the build result using the eclipse client it displays correctly, bu I see this this
error in the error log.
How do I fix this this problem? Do I have to create a start request, how would I do that?


IBuildDefinition buildDef = BuildItemFactory.createBuildDefinition(projectArea);
IBuildResult result = BuildItemFactory.createBuildResult(buildDef);
ITeamBuildClient buildClient = (ITeamBuildClient) repo.getClientLibrary(ITeamBuildClient.class);      
buildClient.save(result,MONITOR);

One answer



permanent link
K M (38325251) | answered Nov 25 '13, 4:47 p.m.
Add a build request and the error goes away, this require the the build definition to have a build engine

        ITeamBuildRequestClient requestClient = (ITeamBuildRequestClient) repo.getClientLibrary(ITeamBuildRequestClient.class);
        IBuildRequest buildRequest = requestClient.requestBuild(buildDef, true, MONITOR);
        IBuildResultHandle buildResultHandle = buildRequest.getBuildResult();
        IBuildResult result_real = (IBuildResult)repo.itemManager().fetchCompleteItem(buildResultHandle,IItemManager.DEFAULT, MONITOR);           
        IBuildResult result = (IBuildResult) result_real.getWorkingCopy();

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.