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

ILinkServiceLibrary I get failed to activate

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.



0 votes


Accepted answer

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

0 votes

Comments

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

I tried

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

but it returns null;


One other answer

Permanent link
Thanks ..it worked with <requiredservice interface="com.ibm.team.links.common.service.ILinkService"/>..

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: Jan 11 '13, 5:36 a.m.

Question was seen: 4,344 times

Last updated: May 15 '13, 8:04 a.m.

Confirmation Cancel Confirm