service failed to activate because a service that it depends on, "com.ibm.team.repository.client.ITeamRepositoryService", is not registered.
I just cannot figure out why I have this problem.
I'm working on a server side extension and when I try to get a TeamRepositoryService I get this error in runtime.
I'm working on a Jetty test environment and I get connected to the test server through a RTC client in localhost.
When I catch a workitemsave event and I try to get the repo I get this error.
I tried in both the following ways
I added the requested service both in the manifest dependencies and plugin.xml as prerequisites
Any idea of why I get this TeamServiceRegistryException?
I'm working on a server side extension and when I try to get a TeamRepositoryService I get this error in runtime.
I'm working on a Jetty test environment and I get connected to the test server through a RTC client in localhost.
When I catch a workitemsave event and I try to get the repo I get this error.
/jazz/service/com.ibm.team.workitem.common.internal.IWorkItemRepositoryService] ERROR com.ibm.team.process.common - CRJAZ6011E The operation participant cannot be created because an exception occurred. For more information, see the exception.
com.ibm.team.repository.common.transport.TeamServiceRegistryException: CRJAZ2671E The "net.jazz.rtcext.workitem.extensions.service.BuildOnStateChangeParticipant" service failed to activate because a service that it depends on, "com.ibm.team.repository.client.ITeamRepositoryService", is not registered.
I tried in both the following ways
ITeamRepository repo = TeamPlatform.getTeamRepositoryService().getTeamRepository("http://localhost:7443/jazz");
ITeamRepositoryService repoService = this.getService(ITeamRepositoryService.class);
I added the requested service both in the manifest dependencies and plugin.xml as prerequisites
Any idea of why I get this TeamServiceRegistryException?
3 answers
This is an advisor for SCM operations. It might be a good starting point: https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/
ITeamRepository is client API. You can't use it on the server. You can't gerService() interfaces that are no services.
ITeamRepository is client API. You can't use it on the server. You can't gerService() interfaces that are no services.
So do you think that I have to use
instead of
?
Can't I use IOperationParticipant?
public class MyPlugin extends AbstractService implements IOperationParticipant {
instead of
public class MyPlugin extends AbstractScmService implements IOperationAdvisor {
?
Can't I use IOperationParticipant?
Comments
I'm sorry but i'm not able to find a solution to the problem.
The actions the i'd like to do are
but to do this i need
and to do this i need
but these methods are client side so I cannot use them.
So I cannot find a method to access files in the changeset.
I've found IScmService.configurationDetermineAncestorInHistory but it need a ServiceConfigurationProvider and i don't know where to obtain this object.
If anyone has suggestions or examples would be wonderful. It's strange that is possible (but not simple) to access files in the client side but quite difficult to do this on the server side.
The actions the i'd like to do are
configuration.determineAncestorsInHistory(lst,getMon);
but to do this i need
IConfiguration configuration = workspaceConnection.configuration(component);
and to do this i need
IWorkspaceConnection workspaceConnection= workspaceManager.getWorkspaceConnection
but these methods are client side so I cannot use them.
So I cannot find a method to access files in the changeset.
I've found IScmService.configurationDetermineAncestorInHistory but it need a ServiceConfigurationProvider and i don't know where to obtain this object.
If anyone has suggestions or examples would be wonderful. It's strange that is possible (but not simple) to access files in the client side but quite difficult to do this on the server side.
Comments
sam detweiler
Sep 08 '14, 7:42 a.m.Marco Gianfico
Sep 08 '14, 8:22 a.m.sam detweiler
Sep 08 '14, 8:35 a.m.Marco Gianfico
Sep 08 '14, 8:52 a.m.