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

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?

0 votes



One answer

Permanent link
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()?

1 vote

Comments

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

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

Question asked: Sep 20 '12, 9:04 a.m.

Question was seen: 5,048 times

Last updated: Sep 20 '12, 12:45 p.m.

Confirmation Cancel Confirm