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)
|
Be the first one to answer this question!
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.