It's all about the answers!

Ask a question

Problem registering service in advisor


Yehiel Glass (25538986) | asked Dec 23 '12, 3:12 a.m.
 Hi
I'm wrote an advisor using IServerProcess .
My code has no errors and I added the dependency on plugin.xml, but when I run the Jetty debug server, I get the following error:
Unable to instantiate advisor advisor.example.operationAdvisor2.
CRJAZ6010E:An exception occurred creating extension.

Caused by: 
com.ibm.team.repository.common.transport.TeamServiceRegistryException: CRJAZ1115I The "com.ibm.team.process.service.IServerProcess" service was not registered.
at com.ibm.team.repository.common.transport.internal.registry.OsgiServicesManager.getClassForInterface(OsgiServicesManager.java:195)
at com.ibm.team.repository.common.transport.internal.registry.OsgiServicesManager.getService(OsgiServicesManager.java:256)
at com.ibm.team.repository.common.transport.internal.registry.AbstractActivationManagerOwner.buildServicesMap(AbstractActivationManagerOwner.java:316)


What should I do for fixing this error ?
Thanks,
Yehiel

Accepted answer


permanent link
sam detweiler (12.5k6195201) | answered Jan 01 '13, 9:09 a.m.
looking at the com.ibm.team.process.service jar plugin.xml (use Winrar or winzip to view the plugin contents),
the plugin.xml exposes this service

< providedService interface="com.ibm.team.process.service.IProcessServerService" />
in YOUR plugin, you MUST tell the system you intend to USE the service..
in your prerequeisites
<prerequisites>
    <requiredService interface="com.ibm.team.process.service.IProcessServerService"/>

Yehiel Glass selected this answer as the correct answer

Comments
Yehiel Glass commented Jan 06 '13, 3:13 p.m.

Thanks Sam.

The code I used is :
IProcessServerService serverProcess1 = getService(IProcessServerService.class);
IServerProcess serverProcess = serverProcess1.getServerProcess(processArea); 

Thanks.

One other answer



permanent link
sam detweiler (12.5k6195201) | answered Dec 23 '12, 8:28 a.m.
why did you use IServerProcess?  advisors and participants should extend AtractService and implement IOperationAdvisor or IOperationParticipant

I don't see IServerProcess exposed on com.ibm.team.process.service jar

Comments
Yehiel Glass commented Jan 01 '13, 6:49 a.m.

Hi,

If I'm working on server side plugin, How can I get contributor roles ?

IContributorHandle myapprover = approval.getApprover();

IRole[] contributorRoles = serverProcess.getContributorRoles(myapprover, processArea);

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.