Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Running client api application

Hi, I developed a simple client app to access rtc users records. It works in eclipse, but stops in the jar file I built to run non-interactively.
It fails on this line
>>> ITeamRepository teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI); <<<
after TeamPlatform has started.
Any help please?
regards
Sola


TeamPlatform.startup();


if (!TeamPlatform.isStarted()){
System.out.println("Unable to start team platform");
System.exit(1);
}

System.out.println("team platform status [" + TeamPlatform.isStarted() + "]");

try {
IProgressMonitor monitor = new NullProgressMonitor();
ITeamRepository teamRepository = login(repositoryURI, monitor);
System.out.println("\nlogged in to rtc connection...\n");
run(teamRepository, monitor, assignee);
} catch (TeamRepositoryException e) {
System.out.println("Unable to login: " + e.getMessage());
e.printStackTrace();
} finally {
System.out.println("\nshutting down rtc connection...");
TeamPlatform.shutdown();
System.exit(0);
}


public static ITeamRepository login(String repositoryURI, IProgressMonitor monitor) throws TeamRepositoryException{
String adminUserId = "xxxxxx";
String adminPasswd = "xxxxxx";

System.out.println("doing TeamPlatform.getTeamRepositoryService() ...");

// next line is failing
ITeamRepository teamRepository = TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI);
System.out.println("done...");

System.out.println("doing teamRepository.registerLoginHandler ...");
teamRepository.registerLoginHandler(new LoginHandler(adminUserId, adminPasswd));
System.out.println("done...");

System.out.println("doing teamRepository.login(monitor) ...");
teamRepository.login(monitor);
System.out.println("done...");

return teamRepository;
}

0 votes



8 answers

Permanent link
what do u mean by 'stops'?

Sam

0 votes


Permanent link
It exits (returns to the finally block) when executing the indicated line.

0 votes


Permanent link
well, your exception handler only handles one exception type

} catch (TeamRepositoryException e) {

I would make it less specific and report out the error

Sam

0 votes


Permanent link
Hi Sola,

This is not related to your query.

I am new to RTC.

I have got a attribute "Request Type" of enum type in a workitem. I need to force the approval based on the value of Request Type field.

Is this possible?

I am interested to work on automation. Basically I am a perl programmer working in Build Release domain. Could you please tell where I can find the RTC API?

CHeers,
Jose

0 votes


Permanent link
the RTC api is a set of classes and methods.. in the latest release, 3.0.1.1, the javadoc has been published (see the download site) , but it does not contain everything in the SDK.

Many of the seemingly trivial things people want to do are very complex with the OO design of RTC as there is no direct procedural api.

there are many examples on the wiki and in the doc. there is NO good overview or class/api architecture doc.

Sam

0 votes


Permanent link
Hi Sam,

Thanks a lot for your update.

I guess doo framework is relatively easy for automation. Have you got any example scripts which uses doo.

Have you got any hint for my approval query?

Cheers,
Simon

the RTC api is a set of classes and methods.. in the latest release, 3.0.1.1, the javadoc has been published (see the download site) , but it does not contain everything in the SDK.

Many of the seemingly trivial things people want to do are very complex with the OO design of RTC as there is no direct procedural api.

there are many examples on the wiki and in the doc. there is NO good overview or class/api architecture doc.

Sam

0 votes


Permanent link
by doo , do you mean dojo? I have no experience there.

I also have no idea about your approval process query.. I would like that answer too.. (I haven't spent any time trying this myself) but I would guess it is in the OperationParticipant context.. which is all server side, no javascript.

Sam

0 votes


Permanent link
Hi Sam,

Yes. I mean Dojo framework.

Thanks for your update.

Cheers,
Simon


by doo , do you mean dojo? I have no experience there.

I also have no idea about your approval process query.. I would like that answer too.. (I haven't spent any time trying this myself) but I would guess it is in the OperationParticipant context.. which is all server side, no javascript.

Sam

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,927

Question asked: Dec 08 '11, 5:17 a.m.

Question was seen: 6,357 times

Last updated: Dec 08 '11, 5:17 a.m.

Confirmation Cancel Confirm