It's all about the answers!

Ask a question

Exception on retrieving service


Michele Pegoraro (1.8k14118103) | asked Jul 28 '09, 7:52 a.m.
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.

6 answers



permanent link
Michele Pegoraro (1.8k14118103) | answered Aug 31 '09, 5:39 a.m.
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.

permanent link
Hema Sudarshan (4143) | answered Aug 19 '09, 4:26 a.m.
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.

permanent link
Michele Pegoraro (1.8k14118103) | answered Jul 29 '09, 10:11 a.m.
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.

permanent link
Michele Pegoraro (1.8k14118103) | answered Jul 29 '09, 8:28 a.m.
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.

permanent link
Michele Pegoraro (1.8k14118103) | answered Jul 29 '09, 3:43 a.m.
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.

permanent link
Ryan Manwiller (1.3k1) | answered Jul 28 '09, 6:18 p.m.
JAZZ DEVELOPER
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

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.