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

Create my own participant based in Rational Team Concert 4.0 Extensions Workshop

I'm trying to create my own Participant based in Rational Team Concert 4.0 Extensions Workshop. But I'm having the following error: 
The service 'br.com.gvt.participant.CancelarFilhosPeloPai@3bc23bc2' failed to find the required service 'interface com.ibm.team.workitem.service.IWorkItemServer'.  Check <prerequisites> in plugin.xml.

The console shows the following error:
16:15:27,058 [138610755@qtp-676014155-6] ERROR com.ibm.team.process.common                         - The service 'br.com.gvt.participant.CancelarFilhosPeloPai@3bc23bc2' failed to find the required service 'interface com.ibm.team.workitem.service.IWorkItemServer'.  Check <prerequisites> in plugin.xml.
com.ibm.team.repository.common.transport.internal.registry.ServiceNotFoundException: The service 'br.com.gvt.participant.CancelarFilhosPeloPai@3bc23bc2' failed to find the required service 'interface com.ibm.team.workitem.service.IWorkItemServer'.  Check <prerequisites> in plugin.xml.
at com.ibm.team.repository.service.AbstractService.getService(AbstractService.java:752)
at br.com.gvt.participant.CancelarFilhosPeloPai.run(CancelarFilhosPeloPai.java:86)

Where should I put this class (interface com.ibm.team.workitem.service.IWorkItemServer)? For debug mode works.

Thanks.

0 votes


Accepted answer

Permanent link
If u need additional services, then you MUST declare them in your plugin's plugin.xml

like this

            <extensionService
                componentId="com.sd.tools.workitem.createapproval.participant.component"
                implementationClass="com.sd.tools.CreateApprovalParticipant">
                <prerequisites>
                    <requiredService interface="com.ibm.team.repository.common.service.IContributorService"/>   
                    <requiredService interface="com.ibm.team.workitem.common.IAuditableCommon"/>        
                    <requiredService interface="com.ibm.team.process.service.IProcessServerService"/>
                    <requiredService interface="com.ibm.team.workitem.service.IWorkItemServer"/>
                    <requiredService interface="com.ibm.team.repository.common.service.IQueryService"/>
                    <requiredService interface="com.ibm.team.repository.service.IRepositoryItemService"/> 
                </prerequisites>
            </extensionService>
Tayane Fernandes selected this answer as the correct answer

1 vote


3 other answers

Permanent link
Thank you Sam!
I declared the class in my plugin.xml, but now it throws the error:

com.ibm.team.repository.common.transport.TeamServiceRegistryException: CRJAZ1972E The "com.ibm.team.workitem.service.internal.AllNodeProjectAreaChangeListener" service failed to activate because a service that it depends on, "com.ibm.team.workitem.common.internal.IWorkItemRepositoryService", failed to be activated. For more details, open the help system and search for CRJAZ1972E.
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.buildServicesMap(AbstractActivationManagerOwner.java:331)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.doActivate(AbstractActivationManagerOwner.java:678)
at com.ibm.team.repository.common.transport.internal.registry.ExtensionServiceActivationManagerOwner.doActivate(ExtensionServiceActivationManagerOwner.java:89)
at com.ibm.team.repository.common.transport.internal.registry.ExtensionServiceActivationManagerOwner.forceActivate(ExtensionServiceActivationManagerOwner.java:111)
at com.ibm.team.repository.common.transport.registry.ExtensionServiceElementDescriptor.getImplementation(ExtensionServiceElementDescriptor.java:366)
at com.ibm.team.process.internal.service.ProjectAreaChangeListenerRegistry$ProjectAreaChangeListenerExtensionServiceElementDescriptor.getImplementation(ProjectAreaChangeListenerRegistry.java:233)
at com.ibm.team.process.internal.service.ProjectAreaChangeListenerRegistry.getCalledOnAllNodesListeners(ProjectAreaChangeListenerRegistry.java:200)
at com.ibm.team.process.internal.service.ProjectAreaChangeListenerRunningOnAllNodesTask.runTask(ProjectAreaChangeListenerRunningOnAllNodesTask.java:47)
at com.ibm.team.repository.service.async.AbstractAutoScheduledTask.executeTask(AbstractAutoScheduledTask.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:600)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at $Proxy439.executeTask(Unknown Source)
at com.ibm.team.repository.service.internal.scheduler.AsynchronousTaskRunner.runTask(AsynchronousTaskRunner.java:136)
at com.ibm.team.repository.service.internal.scheduler.AsynchronousTaskRunner.run(AsynchronousTaskRunner.java:99)
at java.lang.Thread.run(Thread.java:736)
Caused by: com.ibm.team.repository.common.transport.TeamServiceRegistryException: CRJAZ1972E The "com.ibm.team.workitem.service.internal.WorkItemRepositoryService" service failed to activate because a service that it depends on, "com.ibm.team.workitem.service.IWorkItemServer", failed to be activated. For more details, open the help system and search for CRJAZ1972E.
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.buildServicesMap(AbstractActivationManagerOwner.java:331)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.doActivate(AbstractActivationManagerOwner.java:678)
at com.ibm.team.repository.common.transport.internal.registry.ServiceProviderActivationManagerOwner.getService(ServiceProviderActivationManagerOwner.java:129)
at com.ibm.team.repository.common.transport.internal.registry.OsgiServicesManager.getService(OsgiServicesManager.java:281)
at com.ibm.team.repository.common.transport.internal.registry.OsgiServicesManager.getService(OsgiServicesManager.java:290)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.buildServicesMap(AbstractActivationManagerOwner.java:328)
... 19 more
Caused by: com.ibm.team.repository.common.transport.TeamServiceRegistryException: CRJAZ1115I The "com.ibm.team.workitem.service.IWorkItemServer" service was not registered.
at com.ibm.team.repository.common.transport.internal.registry.OsgiServicesManager.getClassForInterface(OsgiServicesManager.java:223)
at com.ibm.team.repository.common.transport.internal.registry.OsgiServicesManager.getService(OsgiServicesManager.java:289)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.buildServicesMap(AbstractActivationManagerOwner.java:328)
... 24 more 

0 votes

Comments

"com.ibm.team.workitem.service.internal.AllNodeProjectAreaChangeListener" service failed to activate because a service that it depends on, "com.ibm.team.workitem.common.internal.IWorkItemRepositoryService", failed to be activated.

be careful.. just because there is a classname, doesn't mean THAT name is exposed as a service.     many times I have to look in the repository.service plugin.xml to find out how the services are registered..

in the sdk plugins folder, fond the folder for the repository service, in that folder is the plugin.xml . 

But the error is caused by: com.ibm.team.repository.common.transport.TeamServiceRegistryException: CRJAZ1972E The "com.ibm.team.workitem.service.internal.WorkItemRepositoryService" service failed to activate because a service that it depends on, "com.ibm.team.workitem.service.IWorkItemServer", failed to be activated. For more details, open the help system and search for CRJAZ1972E. 


The service com.ibm.team.workitem.service.IWorkItemServer is with the correct name, isn't it?


Permanent link
directly from my participant
<plugin>
   <extension
         point="com.ibm.team.process.service.operationParticipants">
      <operationParticipant
            class="com.sd.tools.CreateApprovalParticipant"
            id="com.sd.tools.workitem.createapproval.participant"
            name="Create Approval Participant"
            operationId="com.ibm.team.workitem.operation.workItemSave">
            <extensionService
                componentId="com.sd.tools.workitem.createapproval.participant.component"
                implementationClass="com.sd.tools.CreateApprovalParticipant">
                <prerequisites>
                    <requiredService interface="com.ibm.team.repository.common.service.IContributorService"/>   
                    <requiredService interface="com.ibm.team.workitem.common.IAuditableCommon"/>        
                    <requiredService interface="com.ibm.team.process.service.IProcessServerService"/>
                    <requiredService interface="com.ibm.team.workitem.service.IWorkItemServer"/>
                    <requiredService interface="com.ibm.team.repository.common.service.IQueryService"/>
                    <requiredService interface="com.ibm.team.repository.service.IRepositoryItemService"/> 
                </prerequisites>
            </extensionService>

0 votes

Comments

and u are restarting the server cold after changing your plugin, right?

https://serveraddress:port/ccm/admin/cmd/requestReset

the stop/start server

else u will keep using the old plugin in the server cache


Permanent link
 This is my plugin.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension  point="com.ibm.team.process.service.operationParticipants">
      <operationParticipant  class="br.com.gvt.participant.CancelarFilhosPeloPai" 
            id="GVT-CancelarFilhosPeloPai.CancelarFilhosPeloPai"
            name="GVTCancelarFilhosPeloPai"
            operationId="com.ibm.team.workitem.operation.workItemSave">
         <extensionService
               componentId="GVT-CancelarFilhosPeloPai.extensionService"
               implementationClass="br.com.gvt.participant.CancelarFilhosPeloPai">
               <prerequisites> 
                    <requiredservice interface="com.ibm.team.repository.common.service.IContributorService"/>    
                    <requiredservice interface="com.ibm.team.workitem.common.IAuditableCommon"/>         
                    <requiredservice interface="com.ibm.team.process.service.IProcessServerService"/> 
                    <requiredservice interface="com.ibm.team.workitem.service.IWorkItemServer"/> 
                    <requiredservice interface="com.ibm.team.repository.common.service.IQueryService"/> 
                    <requiredservice interface="com.ibm.team.repository.service.IRepositoryItemService"/>    
                </prerequisites>
         </extensionService>
      </operationParticipant>
   </extension>
</plugin> 

0 votes

Your answer

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

Question asked: Feb 28 '14, 3:04 p.m.

Question was seen: 5,181 times

Last updated: Mar 03 '14, 4:13 p.m.

Confirmation Cancel Confirm