Problem registering service in advisor
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
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
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
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.