It's all about the answers!

Ask a question

ClassCastException when trying to log into my repository

S M (8621923) | asked Sep 20 '12, 9:04 a.m.
edited Sep 20 '12, 9:06 a.m.
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: cannot be cast to

I have no idea what I am doing wrong. Any hints?

One answer

permanent link
Lauren Hayward Schaefer (3.3k11727) | answered Sep 20 '12, 10:21 a.m.
Hi Sebastian,
I haven't hit this error before, so I'm not sure what could be causing it. 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

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.

Lauren Hayward Schaefer commented Sep 20 '12, 12:45 p.m.

I'm not sure what could be causing the problem. Perhaps someone else has an idea. may give you some help with your dependencies.

Your answer

Register or to post your answer.