ClassCastException when trying to log into my repository
I try to programatically login into my server using this method:
ITeamRepository repository = TeamPlatform.getTeamRepositoryService().getTeamRepository(server); However, i get the following exception: Caused by: java.lang.ClassCastException: com.ibm.team.process.internal.rcp.ui.RepositoryCertificateHandler cannot be cast to com.ibm.team.repository.client.ICertificateHandler at com.ibm.team.repository.client.internal.CertificateHandlerExtensionReader$Descriptor.getHandler(CertificateHandlerExtensionReader.java:147) at com.ibm.team.repository.client.internal.CertificateHandlerExtensionReader.getHighestPriorityHandler(CertificateHandlerExtensionReader.java:102) at com.ibm.team.repository.client.internal.TeamRepository.getCertificateHandler(TeamRepository.java:1884) at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:370) at com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:526) at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:112) at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:131) I have no idea what I am doing wrong. Any hints? |
One answer
Hi Sebastian,
I haven't hit this error before, so I'm not sure what could be causing it. https://jazz.net/wiki/bin/view/Main/ProgrammaticWorkItemCreation has an example of how to get the team repository. Maybe if you look through that code, you can see if there is something you are missing. Are you calling TeamPlatform.startup()? Comments
S M
commented Sep 20 '12, 10:45 a.m.
I'm calling TeamPlatform.startup() immediately before. And I'm doing exactly the same as in the link you provided. I have to add that I'm doing this in an Eclipse plugin, so I assume that it is caused by some weird dependencies. But I have no hint where I should start to look for an error. I'm not sure what could be causing the problem. Perhaps someone else has an idea. https://jazz.net/wiki/bin/view/Main/ClientLibrarySetup may give you some help with your dependencies. |
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.