It's all about the answers!

Ask a question

ILinkServiceLibrary I get failed to activate


Meera Varma (91912) | asked Jan 11 '13, 5:36 a.m.
I am using the following imports in the programme

import java.net.URI;
import java.util.Arrays;
import java.util.List;
import java.util.Set;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;

import com.ibm.team.workitem.common.ISaveParameter;
import com.ibm.team.workitem.common.IWorkItemCommon;

import com.ibm.team.workitem.common.model.IAttribute;
import com.ibm.team.workitem.common.model.ICategoryHandle;
import com.ibm.team.workitem.common.model.IEnumeration;
import com.ibm.team.workitem.common.model.ILiteral;
import com.ibm.team.workitem.common.model.IWorkItem;
import com.ibm.team.workitem.common.model.IWorkItemType;
import com.ibm.team.workitem.common.model.Identifier;
import com.ibm.team.workitem.common.model.WorkItemLinkTypes;
import com.ibm.team.workitem.service.IAuditableServer;
import com.ibm.team.workitem.service.IWorkItemServer;

import com.ibm.team.foundation.common.text.XMLString;
import com.ibm.team.links.common.ILink;
import com.ibm.team.links.common.IReference;
import com.ibm.team.links.common.factory.IReferenceFactory;
import com.ibm.team.links.common.service.ILinkService;
import com.ibm.team.links.service.ILinkServiceLibrary;
import com.ibm.team.process.common.IProcessConfigurationElement;
import com.ibm.team.process.common.IProjectArea;
import com.ibm.team.process.common.IProjectAreaHandle;
import com.ibm.team.process.common.advice.AdvisableOperation;
import com.ibm.team.process.common.advice.IReportInfo;
import com.ibm.team.process.common.advice.TeamOperationCanceledException;
import com.ibm.team.process.common.advice.runtime.IOperationParticipant;
import com.ibm.team.process.common.advice.runtime.IParticipantInfoCollector;
import com.ibm.team.repository.common.IAuditable;
import com.ibm.team.repository.common.IContributor;
import com.ibm.team.repository.common.IContributorHandle;
import com.ibm.team.repository.common.IItem;
import com.ibm.team.repository.common.TeamRepositoryException;
import com.ibm.team.repository.common.service.IContributorService;
import com.ibm.team.repository.service.AbstractService;
import com.ibm.team.repository.service.IRepositoryItemService;


and I have put the following plugin.xml as prerequistes

<prerequisites>
               <requiredservice interface="com.ibm.team.repository.common.service.IContributorService"/>
               <requiredservice interface="com.ibm.team.workitem.service.IWorkItemServer"/>
               <requiredservice interface="com.ibm.team.repository.service.IRepositoryItemService"/>
               <requiredservice interface="com.ibm.team.workitem.service.IAuditableServer"/>
               <requiredservice interface="com.ibm.team.links.common.service.ILinkService"/>
               <requiredservice interface="com.ibm.team.workitem.common.IWorkItemCommon"/>
               <requiredservice interface="com.ibm.team.links.service.ILinkServiceLibrary"/>
               </prerequisites>

However I get the error CRJAZ11151 The "com.ibm.team.links.service.ILinkServiceLibrary" service was not registered .  I do not know what could be the issue. Apprecaite your help.



Accepted answer


permanent link
Ralph Schoon (59.1k23642) | answered Jan 22 '13, 2:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
So this is a server extension then........

You can find an example here: http://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ the code is published with another post that is available by a link. There are also several other posts around links in Client and Server extensions.

It uses the following prerequisites. Please note the service you are looking for is called com.ibm.team.links.common.service.ILinkService and not ILinkServiceLibrary:

            <prerequisites>
               <requiredService interface="com.ibm.team.workitem.service.IWorkItemServer" />
               <requiredService interface="com.ibm.team.workitem.common.IWorkItemCommon" />
               <requiredService interface="com.ibm.team.workitem.common.IAuditableCommon" />
               <requiredService interface="com.ibm.team.links.common.service.ILinkService" />
               <requiredService interface="com.ibm.team.repository.common.service.IContributorService"/>   
           </prerequisites>
Meera Varma selected this answer as the correct answer

Comments
Morten Madsen commented May 15 '13, 7:45 a.m. | edited May 15 '13, 7:46 a.m.

Is there a way to do this from the Java API?

I tried

ILinkService service = (ILinkService) repo.getClientLibrary(ILinkService.class);

but it returns null;


Morten Madsen commented May 15 '13, 8:04 a.m.

One other answer



permanent link
Meera Varma (91912) | answered Jan 25 '13, 7:53 a.m.
Thanks ..it worked with <requiredservice interface="com.ibm.team.links.common.service.ILinkService"/>..

Your answer


Register or to post your answer.