Not able to login in to RTC using ITeamRepository in RTC EClipse Client

When i tried to login in to rtc using eclipse client as shown below in the code :-
private static String REPOSITORY_ADDRESS = System.getProperty("repositoryAddress","https://localhost:9443/ccm/");
private static String USER_AND_PASSWORD = System.getProperty("admin", "admin123");
ITeamRepository repository = TeamPlatform.getTeamRepositoryService()
.getTeamRepository(repoURL);
repository.registerLoginHandler(new ITeamRepository.ILoginHandler() {
public ILoginInfo challenge(ITeamRepository repository) {
return new ILoginInfo() {
public String getUserId() {
return rtcuser;
}
public String getPassword() {
return rtcpasswd;
}
It is throwing me error as :-
Contacting https://localhost:9443/ccm/...
Unable to login: CRJAZ0124E The user name or password is invalid.
Where the username and password is coorect as i am able to login directly in the web using same username and password.
One answer

The way you present the code seems to indicate a lack of understanding how it works.
There is no indication in the code that the usermane and password are actually passed to the login handler in any way. If the code complains about the user name and password, that is likely the problem.
Instead of using the properties and the embedded class, maybe use something simpler that is easier to understand? Maybe visit https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ especially https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ and try to reuse an example that works?
Comments

Hello Ralph
I had passed the username and password to the login handler still , I am facing the same issue.

public static ITeamRepository login(IProgressMonitor monitor) throwsTeamRepositoryException { ITeamRepository repository = TeamPlatform.getTeamRepositoryService().getTeamRepository(REPOSITORY_ADDRESS); repository.registerLoginHandler(new ITeamRepository.ILoginHandler() { public ILoginInfo challenge(ITeamRepository repository) {
return new ILoginInfo() {
public String getUserId() {
return USERNAME;
}
public String getPassword() {
return PWD;
}