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

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

0 votes


Accepted answer

Permanent link
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

1 vote

Comments

Thanks Sam.

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

Thanks.


One other answer

Permanent link
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

0 votes

Comments

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

Question asked: Dec 23 '12, 3:12 a.m.

Question was seen: 3,883 times

Last updated: Jan 06 '13, 3:13 p.m.

Confirmation Cancel Confirm