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

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

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.

0 votes



One answer

Permanent link

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?

0 votes

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

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

Question asked: Dec 21 '17, 12:13 a.m.

Question was seen: 3,739 times

Last updated: Dec 21 '17, 11:33 p.m.

Confirmation Cancel Confirm