It's all about the answers!

Ask a question

RTC 4 how to get IContributorService?


Nicolás Rodríguez (3142325) | asked Jul 26 '12, 6:05 p.m.
 Hi

I am trying to get IContributorService to get a Contributor,
I using the following code:
IContributorService service=getService(IContributorService.class);

But i m getting a runtime error that says that he cant find the service.

I m using this method in an class that extends from AbstractService and implements OperationParticipant.

what i m doing wrong?

Accepted answer


permanent link
sam detweiler (12.5k6195201) | answered Jul 26 '12, 10:23 p.m.
 You have to tell the system you might bind to this service thru your plugin.xml

I am traveling at the moment(stuck in JFK) but will update tomorrow or weekend sometime

Sam
Nicolás Rodríguez selected this answer as the correct answer

3 other answers



permanent link
Nicolás Rodríguez (3142325) | answered Jul 27 '12, 10:49 a.m.
 Hi Sam

I modified the plugin.xml and add a prerequisite  com.ibm.team.repository.common.service.IContributorService  to my service, but still I have the same error.

in the Extensions tab i have:
com.ibm.team.process.service.operationParticipants
  -Add Subscriptor(operation Participant)
    -com.ibm.team.rtc.plugins.AddSubscriptor(extensionService)
      -(prerequisites)
        - com.ibm.team.repository.common.service.IContributorService(requieredService).

Is there something that i am missing?


permanent link
Nicolás Rodríguez (3142325) | answered Jul 27 '12, 11:07 a.m.
 The error message its "the service 'com.ibm.rtc.plugins.AddSubscriptor' failed to find the requiered service 'interface com.ibm.team.repository.common.service.IContributorService'. Check <prerequistes> in plugin.xml "

permanent link
Nicolás Rodríguez (3142325) | answered Jul 27 '12, 12:30 p.m.
 I already solved, my problem was a misspelled word

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.