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

Why does my application pause after call to TeamPlatform.startup();

 I am using the RTC 6.0.3 Plain Java API running on Windows to extract the number of used licenses. The application pauses for several minutes when it calls TeamPlatform.startup(). I get the error message:


"log4j:WARN No appenders could be found for logger (com.ibm.team.repository.common.internal.util.InternalTeamPlatform).
log4j:WARN Please initialize the log4j system properly."

I am not sure how significant this is to the issue. The code is below:

import com.ibm.team.repository.client.ITeamRepository;
import com.ibm.team.repository.client.TeamPlatform;
import com.ibm.team.repository.client.internal.TeamRepository;
import com.ibm.team.repository.common.ILicenseAdminService2;
import com.ibm.team.repository.common.TeamRepositoryException;
import com.ibm.team.repository.common.model.UsedLicenseInfoDTO;
import com.jlr.rmdv.admintools.performancesaas.x260QACLOUDV2.RTCLoginHandler;

public class Licenses {
public static int printLicensesIssued (String userId, String password) throws TeamRepositoryException {
TeamPlatform.startup();
ITeamRepository repo = TeamPlatform.getTeamRepositoryService().getTeamRepository("https://wwwcqa.pd-dv.jlrint.com/ccm/");
repo.registerLoginHandler(new RTCLoginHandler(userId, password));
repo.login(null);
ILicenseAdminService2 licenseService = (ILicenseAdminService2) ((TeamRepository)repo).getServiceInterface(ILicenseAdminService2.class);

UsedLicenseInfoDTO licenseInfo;
licenseInfo = licenseService.getUsedLicenseInfo();
return licenseInfo.getCountedActiveLeases();
}
}

0 votes


Accepted answer

Permanent link

My best guess is that you use an arbitrary version of Java and that creates the problem. Use the Java version that ships with the RTC Eclipse client or the server.

The warning message you mention is always there.

Russell Norlund selected this answer as the correct answer

0 votes

Comments

Thanks Ralph, I am using Java 1.8 to support some selenium libraries that I am using. The server version is at 1.7 so you have identified the problem 

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,937

Question asked: Mar 29 '18, 2:40 a.m.

Question was seen: 1,073 times

Last updated: Mar 29 '18, 4:39 a.m.

Confirmation Cancel Confirm