I'm trying to log in to java api 6.0.2 using java:
TeamPlatform.startup();
repo = TeamPlatform.getTeamRepositoryService().getTeamRepository(repoUri);
repo.registerLoginHandler(new ILoginHandler2() {
public ILoginInfo2 challenge(ITeamRepository repo) {
return new UsernameAndPasswordLoginInfo(userId, password);
}
});
But I'm getting the error below when executing the repo.login () method:
com.ibm.team.repository.common.TeamRepositoryException: Unexpected character "60": line 3, column 1
at com.ibm.team.repository.client.internal.TeamRepository.fetchClientVersionJSONObject(TeamRepository.java:1746)
at com.ibm.team.repository.client.internal.TeamRepository.access$0(TeamRepository.java:1699)
at com.ibm.team.repository.client.internal.TeamRepository$5.run(TeamRepository.java:1770)
at com.ibm.team.repository.client.internal.TeamRepository$5.run(TeamRepository.java:1)
at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1328)
at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79)
at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1323)
at com.ibm.team.repository.client.internal.TeamRepository.checkServerVersionMatches(TeamRepository.java:1773)
at com.ibm.team.repository.client.internal.TeamRepository.internalLogin(TeamRepository.java:1521)
at com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepository.java:654)
at com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepository.java:628)
at snippets.Snippet1.login(Snippet1.java:67)
at snippets.AllSnippets.main(AllSnippets.java:28)
Caused by: java.io.IOException: Unexpected character "60": line 3, column 1
at com.ibm.team.repository.common.json.internal.Tokenizer.next(Tokenizer.java:113)
at com.ibm.team.repository.common.json.internal.Parser.parse(Parser.java:30)
at com.ibm.team.repository.common.json.JSONObject.parse(JSONObject.java:72)
at com.ibm.team.repository.client.internal.TeamRepository.fetchClientVersionJSONObject(TeamRepository.java:1744)
... 12 more
This code was working normally, but suddenly it started giving this error. Does anyone know how to solve this problem?