It's all about the answers!

Ask a question

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


Russell Norlund (17211724) | asked Mar 29 '18, 2:40 a.m.

 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();
}
}

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Mar 29 '18, 2:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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

Comments
Russell Norlund commented Mar 29 '18, 4:39 a.m.

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 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.