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

Class compatibility issue while instantiating services using RTC client api

Hi All,

I have created UI based eclipse plugin on top of RTC client. I am trying to instantiate IProcessItemService using RTC client api. I have used below

if(!TeamPlatform.isStarted()){

TeamPlatform.startup();

System.out.println("start up platform");

}

//TeamPlatform.startup();

String repoUri = "serverUrl";

TeamRepository repository = (TeamRepository) TeamPlatform.getTeamRepositoryService().getTeamRepository(repoUri);

repository.registerLoginHandler(new MyLoginHandler());

try {

repository.login(null);

IContributor user = repository.loggedInContributor();

com.ibm.team.process.client.IProcessItemService processItemService = (com.ibm.team.process.client.IProcessItemService) repository

.getClientLibrary(com.ibm.team.process.client.IProcessItemService.class);// This is where it throws classcast exception

} catch (TeamRepositoryException e1) {

e1.printStackTrace();

}

Could you please let me know where I am doing wrong thing or missing any inputs.

The log it shows is,

 java.lang.ClassCastException: com.ibm.team.process.internal.client.ProcessClientService incompatible with com.ibm.team.process.client.IProcessItemServiceat org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
...

0 votes


Be the first one to answer this question!

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

Question asked: Mar 08 '16, 11:47 a.m.

Question was seen: 2,258 times

Last updated: Mar 08 '16, 11:47 a.m.

Confirmation Cancel Confirm