create new workitem from plugin
Hi,
i have developed the plain java code for creating new workitem. Its working fine. while implementing this code with plug in. The following error occured. java.lang.ClassCastException: com.ibm.team.process.internal.rcp.ui.RepositoryCertificateHandler incompatible with com.ibm.team.repository.client.ICertificateHandler at com.ibm.team.repository.client.internal.CertificateHandlerExtensionReader$Descriptor.getHandler(CertificateHandlerExtensionReader.java:146) at com.ibm.team.repository.client.internal.CertificateHandlerExtensionReader.getHighestPriorityHandler(CertificateHandlerExtensionReader.java:101) at com.ibm.team.repository.client.internal.TeamRepository.getCertificateHandler(TeamRepository.java:1608) at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:323) at com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:366) at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:91) at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:110) Thanks, pugazh |
Accepted answer
On Thu, 15 Mar 2012 15:27:12 +0000, pugazhsami wrote:
Hi, Defining current outside of the project context can be tricky as there can be several repository connections connecting to many projects. You could get all of the repository connections and then use the first one in the resulting array for example: public static ITeamRepository getDefaultRepository() { ITeamRepository[] repositories = TeamPlatform.getTeamRepositoryService().getTeamRepositories(); if (repositories.length == 1) { return repositories; } boolean found = false; ITeamRepository targetRepository = null; for (int i = 0; i < repositories.length; i++) { ITeamRepository teamRepository = repositories; if (teamRepository.loggedIn()) { if (found) { targetRepository = null; } else { targetRepository = teamRepository; found = true; } } } return targetRepository; } -- Boris Kuschel Jazz Jumpstart Team - IBM Software, Rational My Blog: http://blog.boriskuschel.com/ -------------------------------------------------------------------------- This post represents my own opinion, thoughts, and conclusions based on my knowledge of Jazz and the Jazz solutions. For details on receiving official IBM Rational support please go to: https://jazz.net/community/support/ pugazhenthi samidurai selected this answer as the correct answer
|
3 other answers
On Thu, 15 Mar 2012 05:13:10 +0000, pugazhsami wrote:
Hi, $Descriptor.getHandler(CertificateHandlerExtensionReader.java:146) at (CertificateHandlerExtensionReader.java:101) at (TeamRepository.java:1608) at (TeamRepositoryService.java:366) at (TeamRepositoryService.java:91) at (TeamRepositoryService.java:110)
The two packages are different so this a good indication that perhaps there is a problem somewhere. Could you give a little more context to the problem. What is the code leading up to this exception? -- Boris Kuschel Jazz Jumpstart Team - IBM Software, Rational My Blog: http://blog.boriskuschel.com/ -------------------------------------------------------------------------- This post represents my own opinion, thoughts, and conclusions based on my knowledge of Jazz and the Jazz solutions. For details on receiving official IBM Rational support please go to: https://jazz.net/community/support/ |
Hi,
please check this post. https://jazz.net/forums/viewtopic.php?t=23352&highlight=plugin Kindly give me any idea or guide. Thanks, Pugazh |
Hi Boris,
Thanks u very much. Now its working fine. Thanks, Pugazh |
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.