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

Exception on retrieving service

Hi, I've a problem during execution of a server side plugin. I've implemented an operation Advisor for delivery operation.
I'm trying to run it using remote server.
When I try to run it I've this exception:

The service 'it.nexen.server.preop.delivery.StateControl@1ea41ea4' failed to find the required service 'interface com.ibm.team.repository.service.IRepositoryItemService'.  Check <prerequisites> in plugin.xml.


I have com.ibm.team.repository.service on required plugin and also I can see the service from Component Status on Admin console.
Also, I had tried this plugin a couple of weeks ago without any problem, and I have not change anything in server configuration, I've only changed the project area. Unfortunately I can't retry it on the old project area because I've archived it.

0 votes



6 answers

Permanent link
You need more than just the plugin dependency. You need to list the prerequisites in your plugin.xml in your serviceProvider extension:

...

<prerequisites>
<requiredService interface="com.ibm.team.repository.service.IRepositoryItemService"/>

...


---
Ryan Manwiller
Jazz Team

0 votes


Permanent link
You need more than just the plugin dependency. You need to list the prerequisites in your plugin.xml in your serviceProvider extension:

...

<prerequisites>
<requiredService>

...


---
Ryan Manwiller
Jazz Team

Thank you for the answer, but I don't understand two things:
prerequisites tag must be included on extension service tag, but I don't have to extend any service, just get service for my precondition. If I have to use it, what I can put on componentId? I don't want to create new component, can I use one that already exists?
The second thing is that so I really don't understand how it could run before, but maybe this is my fault.

0 votes


Permanent link
It seems that
<prerequisites>

<requiredService>
</prerequisites>

can be also used at operationAdvisor level. It seems to run althrough PDE tells me that <prerequisites> is not a valid child for operationAdvisor.
Maybe could be useful have <prerequisites> and <requiredService> included on extension point description so it can be used with PDE. Currently the only way is to add manually in the plugin.xml.

0 votes


Permanent link
It seems to run althrough PDE tells me that <prerequisites> is not a valid child for operationAdvisor.

It was not true. After I reboot RTC client and server it does not run. So i put prerequisites into extensionService tag.
It runs but I still don't understand what I have to put on componentId. I have put the name of my class, like into implementationClass but it doesn't make sense to me.

0 votes


Permanent link
Hi, I've a problem during execution of a server side plugin. I've implemented an operation Advisor for delivery operation.
I'm trying to run it using remote server.
When I try to run it I've this exception:

The service 'it.nexen.server.preop.delivery.StateControl@1ea41ea4' failed to find the required service 'interface com.ibm.team.repository.service.IRepositoryItemService'.  Check <prerequisites> in plugin.xml.


I have com.ibm.team.repository.service on required plugin and also I can see the service from Component Status on Admin console.
Also, I had tried this plugin a couple of weeks ago without any problem, and I have not change anything in server configuration, I've only changed the project area. Unfortunately I can't retry it on the old project area because I've archived it.


Basically, i too faced the same prob, it got fixed. Prob was that i was trying to initialize this service with in the constructor of the service. We cant call getService(IRepositoryItemService.class) within the service constructor.

0 votes


Permanent link
I'd like to suggest to update schema definition for this kind of plugin because using PDE there is an annoying warning: the element 'prerequisites' is not a valid child of 'extensionService'.

And this is not true.

0 votes

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

Question asked: Jul 28 '09, 7:52 a.m.

Question was seen: 11,632 times

Last updated: Jul 28 '09, 7:52 a.m.

Confirmation Cancel Confirm