It's all about the answers!

Ask a question

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


Tayane Fernandes (251216) | asked Feb 28 '14, 3:04 p.m.
edited Feb 28 '14, 3:05 p.m.
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.

Accepted answer


permanent link
sam detweiler (12.5k6195201) | answered Feb 28 '14, 8:35 p.m.
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

3 other answers



permanent link
Tayane Fernandes (251216) | answered Mar 03 '14, 4:07 p.m.
edited Mar 03 '14, 4:08 p.m.
 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> 

permanent link
sam detweiler (12.5k6195201) | answered Mar 03 '14, 3:41 p.m.
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>

Comments
sam detweiler commented Mar 03 '14, 4:13 p.m.

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
Tayane Fernandes (251216) | answered Mar 03 '14, 2:16 p.m.
edited Mar 03 '14, 2:16 p.m.
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 

Comments
sam detweiler commented Mar 03 '14, 3:07 p.m.

"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 . 


Tayane Fernandes commented Mar 03 '14, 3:35 p.m.

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?

Your answer


Register or 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.