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

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.

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

0 votes



5 answers

Permanent link
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.

0 votes


Permanent link
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

0 votes


Permanent link
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.

0 votes


Permanent link
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

0 votes


Permanent link
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.

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: Sep 03 '12, 6:01 a.m.

Question was seen: 6,063 times

Last updated: Nov 17 '13, 11:05 a.m.

Confirmation Cancel Confirm