Can NOT create work item based on RTC 4.0 SDK against RTC 4.0.1 server
Our code is based on RTC 4.0 SDK, and now it can NOT create work item against RTC 4.0.1 server, but it works well with RTC 4.0 and 4.0.0.1 server.
The interesting thing is, if run it with Plain Java Library shipped with RTC 4.0, it works well too. I wonder if there has version mismatch, why RTC 4.0 rich client can create work item well against RTC 4.0.1 server, does it bypass the version verification? , as far as I know, the RTC SDK shares the same code with RTC rich client. =============================================== The exception: !ENTRY com.ibm.rmc.export.jazz.ui 4 0 2012-11-30 15:50:52.903 !MESSAGE CRJAZ1241I There is a version mismatch for the "com.ibm.team.workitem" model. The server version is "17" while the client version is "16". Both client and server version must match. Check the overall version of the client using Help->About and ensure it is compatible with server version "4.0.1" and build id "RJF-I20121109-1457". !STACK 0 com.ibm.team.repository.common.TeamRepositoryException: CRJAZ1241I There is a version mismatch for the "com.ibm.team.workitem" model. The server version is "17" while the client version is "16". Both client and server version must match. Check the overall version of the client using Help->About and ensure it is compatible with server version "4.0.1" and build id "RJF-I20121109-1457". at com.ibm.rmc.export.jazz.ui.creation.util.JazzCreationUtil.createWorkItem(JazzCreationUtil.java:460) at com.ibm.rmc.export.jazz.ui.creation.wizards.CreateWorkItemWizard.doIt(CreateWorkItemWizard.java:285) at com.ibm.rmc.export.jazz.ui.creation.wizards.CreateWorkItemWizard.access$1(CreateWorkItemWizard.java:277) at com.ibm.rmc.export.jazz.ui.creation.wizards.CreateWorkItemWizard$1.run(CreateWorkItemWizard.java:80) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: com.ibm.team.repository.common.TeamRepositoryException: CRJAZ1241I There is a version mismatch for the "com.ibm.team.workitem" model. The server version is "17" while the client version is "16". Both client and server version must match. Check the overall version of the client using Help->About and ensure it is compatible with server version "4.0.1" and build id "RJF-I20121109-1457". at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.validateServiceCall(ServiceInterfaceProxy.java:220) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:87) at $Proxy26.save(Unknown Source) at com.ibm.team.workitem.client.internal.WorkItemSaveTransport$1.run(WorkItemSaveTransport.java:33) at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1286) at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79) at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1279) at com.ibm.team.workitem.client.internal.WorkItemSaveTransport.call(WorkItemSaveTransport.java:30) at com.ibm.team.workitem.client.internal.WorkItemSaveRunnable.run(WorkItemSaveRunnable.java:37) at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.runRunnable(OperationAdviceManager.java:1453) at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.execute(OperationAdviceManager.java:204) at com.ibm.team.process.internal.client.ProcessClientService.execute(ProcessClientService.java:777) at com.ibm.team.workitem.client.internal.WorkItemClient.save(WorkItemClient.java:603) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.saveWorkItems(WorkItemWorkingCopyRegistry.java:2273) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.saveAffected(WorkItemWorkingCopyRegistry.java:2164) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.save(WorkItemWorkingCopyRegistry.java:2047) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyRegistry.save(WorkItemWorkingCopyRegistry.java:2008) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyManager.save(WorkItemWorkingCopyManager.java:122) at com.ibm.team.workitem.client.internal.WorkItemWorkingCopyImpl.save(WorkItemWorkingCopyImpl.java:233) at com.ibm.rmc.export.jazz.ui.creation.util.JazzCreationUtil.createWorkItem(JazzCreationUtil.java:458) ... 4 more ============================================== The code is like: public static IWorkItemHandle createWorkItem(ITeamRepository repo, IProgressMonitor monitor) throws TeamRepositoryException { IProcessItemService pservice = (IProcessItemService) repo .getClientLibrary(IProcessItemService.class); List prjAreas = pservice.findAllProjectAreas( IProcessClientService.ALL_PROPERTIES, monitor); IProjectAreaHandle projectArea = (IProjectArea)prjAreas.get(0); IWorkItemClient service = (IWorkItemClient) repo.getClientLibrary(IWorkItemClient.class); IWorkItemType workItemType = service.findWorkItemType(projectArea, "defect", monitor); IWorkItemHandle handle = service.getWorkItemWorkingCopyManager().connectNew(workItemType, monitor); WorkItemWorkingCopy wc = service.getWorkItemWorkingCopyManager().getWorkingCopy(handle); IWorkItem workItem = wc.getWorkItem(); try { List<ICategory> findCategories= service.findCategories(projectArea, ICategory.FULL_PROFILE, monitor); ICategory category = findCategories.get(0); workItem.setCategory(category); workItem.setCreator(repo.loggedInContributor()); workItem.setOwner(repo.loggedInContributor()); workItem.setHTMLSummary(XMLString.createFromPlainText("Example work item")); IDetailedStatus s = wc.save(null); if(! s.isOK()) { throw new TeamRepositoryException("Error saving work item", s.getException()); } } finally { service.getWorkItemWorkingCopyManager().disconnect(workItem); } workItem = (IWorkItem) repo.itemManager().fetchCompleteItem(workItem, IItemManager.DEFAULT, monitor); monitor.subTask("Created a work item " + workItem.getId()); return workItem; } |
Accepted answer
The problem has been fixed after add "com.ibm.team.rtc.common" as a dependency plugin.
More detail discussion can be found here: https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=242982
Ralph Schoon selected this answer as the correct answer
|
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.