It's all about the answers!

Ask a question

The service 'com.ibm.team.build.internal.service.TeamBuildService@4c7e4c7e' failed to find the required service 'interface com.ibm.team.repository.service.IRepositoryItemService'. Check in plugin.xml.


Ananya Joisa (4552124) | asked Sep 03 '12, 6:01 a.m.
Hi,

I am referring the document :https://jazz.net/library/article/634 , and I am trying to go beyond it and create a working copy of the buildDef object, by using the copyDefinition() function. I was trying to set the working copy, make changes and save it as shown above.

BuildDefinition buildDefCopy = (BuildDefinition) buildDef.copyDefinition();
            buildDefCopy.setWorkingCopy(true);
            TeamBuildService saveObject = new TeamBuildService();
            List<IBuildConfigurationElement> configElement =  buildDefCopy.getConfigurationElements();
            Iterator i = configElement.iterator();
            IBuildConfigurationElement buildConfigElement = null;
            while(i.hasNext()){
            buildConfigElement= (IBuildConfigurationElement) i.next();
                if(buildConfigElement.getName().equalsIgnoreCase("ant")){
                    ConfigurationPropertyImpl configPropertyTarget = (ConfigurationPropertyImpl) buildConfigElement.getConfigurationProperty("com.ibm.team.build.ant.targets");
                    configPropertyTarget.setValue("Test_Story");
}

                   
            saveObject.save(buildDefCopy);


 But while saving the work item I am getting the following error.

Exception running followup action.

An unhandled exception occurred during "Build on State Change".

The service 'com.ibm.team.build.internal.service.TeamBuildService@4c7e4c7e' failed to find the required service 'interface com.ibm.team.repository.service.IRepositoryItemService'.  Check <prerequisites> in plugin.xml.

I looked in the jar that had TeamBuildService. It had a plugin.xml which is not modifiable. Please guide.

Thanks,
Ananya

5 answers



permanent link
Albert Yao (5411322) | answered Nov 17 '13, 11:05 a.m.
Your new plugin.xml does not take effect, maybe.
Try to rebuild the site project and delete the directory "tomcat\work\Catalina\localhost\ccm", or develop and deploy the plugin in a new environment.

permanent link
Ananya Joisa (4552124) | answered Sep 04 '12, 9:56 a.m.
Thanks for replying.

I went through the plugin.xml of the project that had TeamBuildService. It looks like this :

<extension
       point="com.ibm.team.repository.service.serviceProvider">  
     <serviceProvider
          componentId="com.ibm.team.build"
          implementationClass="com.ibm.team.build.internal.service.TeamBuildService">
         <provides>
            <providedService interface="com.ibm.team.build.internal.common.ITeamBuildService"/>
        </provides>
        <prerequisites>
            <requiredService interface="com.ibm.team.process.service.IProcessServerService"/>
            <requiredService interface="com.ibm.team.repository.common.service.IChangeEventService"/>
            <requiredService interface="com.ibm.team.repository.common.service.IQueryService"/>
            <requiredService interface="com.ibm.team.repository.service.IServerQueryService"/>
            <requiredService interface="com.ibm.team.repository.service.IRepositoryItemService"/>
            <requiredService interface="com.ibm.team.repository.common.service.IPermissionService"/>
            <requiredService interface="com.ibm.team.repository.service.ITransactionService"/>
            <requiredService interface="com.ibm.team.repository.common.ILicenseService"/>
            <optionalService interface="com.ibm.team.build.internal.common.ITeamBuildRequestService"/>
        </prerequisites>
     </serviceProvider>   
   </extension>
The implementation class is TeamBuildService and it has the interface IRepositoryItemService, added as the required service. Isn't this right? Why am I getting the error then?

FYI I did not make any changes to plugin.xml. The interface was originally added. Please guide.

Thanks,
Ananya

permanent link
VK L (8177154159) | answered Sep 03 '12, 10:16 p.m.
Hi Ananya,
                   Jar file can be extracted using winzip (Same as a zip file extract). After modifying the Plugin.xml, the plugin has to be re-built and deployed -> for the changes to take effect.

You have to modify the plugin.xml of the plugin that you are deploying (Plugin which contains the code that you have put in).

Thanks.

permanent link
Ananya Joisa (4552124) | answered Sep 03 '12, 2:34 p.m.
I am not able to figure out which plugin.xml needs to be edited. When I add the interface in the plugin.xml of the project that has BuildOnStateChangeParticiapant, I still get the error. But the plugin.xml in the project containing TeamBuildService is not modifiable. How do I modify a file that in is a jar?

Thanks,
Ananya

permanent link
VK L (8177154159) | answered Sep 03 '12, 6:15 a.m.
Hi Ananya,
                   Please check the Plugin.xml of the plugin project that you created. You open the Manifest.msf and there will be a plugin.xml tab in it - on the bottom. Check to see if you have included "interface com.ibm.team.repository.service.IRepositoryItemService" as a required service.

Thanks.

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.