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
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
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.
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.
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
Thanks,
Ananya
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.
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.
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
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