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

Element 'prerequisites' is not legal as a child of element '

I have this warning in my Plug-in Descriptor. Where should it go?
All examples I have found add 'prerequisites' as a child of
'extensionService' element.

Thanks in advance,

Chemi.

0 votes



4 answers

Permanent link
On Tue, 01 Dec 2009 18:15:43 +0100, Chemi wrote:

I have this warning in my Plug-in Descriptor. Where should it go? All
examples I have found add 'prerequisites' as a child of
'extensionService' element.

Thanks in advance,

Chemi.

Sounds like what you're doing is correct. You might just be seeing an
error in the schema of the extension-point you're extending.

--
Jared Burns
Jazz Process Team

0 votes


Permanent link

Jared

Iam getting the same issue. The error iam getting over "<requiredService interface="com.ibm.team.process.internal.common.service.IProcessService"/>"

   Can you suggest the Schema ?  Below is my plugin.xml

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         id="TestWorldAdvisor.prohibitSave"
         name="Prohibit Save (Test World Advisor)"
         point="com.ibm.team.process.service.operationAdvisors">
      <operationAdvisor
            class="testworldadvisor.TestWorldProhibitSave"
            id="TestWorldAdvisor.prohibitSave"
            name="Prohibit Save (Test World Advisor)"
            operationId="com.ibm.team.workitem.operation.workItemSave">
            </operationAdvisor>
       <prerequisites>
   <requiredService interface="com.ibm.team.process.internal.common.service.IProcessService"/>
   </prerequisites>
   </extension>
</plugin>

0 votes


Permanent link
 I'm having the same problem.
When trying to run this command:
IMailerService mailerService = getService(IMailerService.class);
in the Java code, the following exception occurs:
"The service '...' fails to find the required service 'interface com.ibm.team.repository.service.IMailerService'. Check <prerequisites> in plugin.xml."
When trying to add the <prerequisites> tag to plugin.xml, I get a warning that

"Element 'prerequisites' is not legal as a child of element..."

regardless of the position I put that tag.

What am I missing here? What am I doing wrong?!

this is the plugin.xml before adding the <prerequisites> tag:
======================================
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="com.ibm.team.process.service.operationAdvisors">
      <operationAdvisor
            class="br.com.bello.IdanTildaCheckAdvisor"
            id="idanTildaCheckAdvisor.operationAdvisor"
            name="IdanTildaCheckAdvisor"
            operationId="com.ibm.team.workitem.operation.workItemSave">
         <extensionService
               componentId="br.com.bello.IdanTildaCheckAdvisor"
               implementationClass="br.com.bello.IdanTildaCheckAdvisor"> 
         </extensionService>
      </operationAdvisor>
   </extension>
</plugin>
====================================

And these are the 3 lines I'm trying to add:

<prerequisites>
<requiredService interface="com.ibm.team.workitem.service.IMailerService"/>
</prerequisites> 

0 votes


Permanent link
The warning "Element 'prerequisites' is not legal as a child of element..." is the result of the schema definition for the extension point you are extending. I am not sure about the background and why it does not get fixed. However, you require the prerequisites. If you try to getService() services and they are not in the prerequisites, you get errors.

You can ignore the warning. If you add the prerequisites as described in https://jazz.net/library/article/1000 for example there should be no issue. You might however run into problems if you add prerequisites that are not real services. You should see that during server start up.

0 votes

Comments

Why it does not get fixed?

It is very confusing and misleading!!! 

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

Question asked: Dec 01 '09, 12:23 p.m.

Question was seen: 8,266 times

Last updated: Nov 17 '13, 8:44 a.m.

Confirmation Cancel Confirm