Exception on retrieving service
![](http://jazz.net/_images/myphoto/64dd52320b9af5c92b76f5a38ad571f5.jpg)
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:
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.
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
![](http://jazz.net/_images/myphoto/64dd52320b9af5c92b76f5a38ad571f5.jpg)
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
...
<prerequisites>
<requiredService interface="com.ibm.team.repository.service.IRepositoryItemService"/>
...
---
Ryan Manwiller
Jazz Team
![](http://jazz.net/_images/myphoto/64dd52320b9af5c92b76f5a38ad571f5.jpg)
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.
![](http://jazz.net/_images/myphoto/64dd52320b9af5c92b76f5a38ad571f5.jpg)
It seems that
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.
<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.
![](http://jazz.net/_images/myphoto/64dd52320b9af5c92b76f5a38ad571f5.jpg)
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.
![](http://jazz.net/_images/myphoto/64dd52320b9af5c92b76f5a38ad571f5.jpg)
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.